Skip to content

Commit e40895f

Browse files
committed
Implement generic CRC-32 + CRC-64 SIMD calculators
Fast, hardware-accelerated CRC calculation for all known CRC-32 and CRC-64 variants using SIMD intrinsics, which can exceed 100GiB/s for CRC-32, and 50GiB/s for CRC-64, on modern systems. Supplies a C/C++ compatible shared library for use with languages other than Rust.
0 parents  commit e40895f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+11994
-0
lines changed

.github/workflows/tests.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
# used when called manually.
8+
workflow_call:
9+
# used when called by _another_ workflow (not when called on this repo!)
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4 # not pinning to commit since this is a GitHub action, which we trust
16+
- id: cache-cargo
17+
name: Cache Cargo toolchain
18+
uses: actions/cache@v4 # not pinning to commit since this is a GitHub action, which we trust
19+
with:
20+
path: |
21+
~/.cargo/bin/
22+
~/.cargo/registry/index/
23+
~/.cargo/registry/cache/
24+
~/.cargo/git/db/
25+
target/
26+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-release
27+
- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }}
28+
name: Install Rust toolchain
29+
uses: actions-rs/toolchain@v1 # not pinning to commit since this is an archived GitHub action, which we trust
30+
with:
31+
profile: minimal
32+
toolchain: stable
33+
override: true
34+
- name: Architecture check
35+
run: cargo run arch-check
36+
- name: Architecture check (Optimized)
37+
run: cargo run --features=optimize_crc32_auto arch-check
38+
- name: Format
39+
run: cargo fmt -- --check
40+
- name: Clippy
41+
run: cargo clippy
42+
- name: Test
43+
run: cargo test
44+
- name: Test (Optimized)
45+
run: cargo test --features=optimize_crc32_auto

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/target
2+
/scratch
3+
/test/test_*.bin
4+
.idea
5+
.DS_Store
6+
.git

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## [1.0.0](https://github.com/awesomized/crc-fast-rust/releases/tag/1.0.0) - 2025-04-10
2+
- First release for crates.io

0 commit comments

Comments
 (0)