- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| .markdownlint-cli2.yaml | ||
| ARCHITECTURE.md | ||
| Cargo.toml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| README.md | ||
| ROADMAP.md | ||
| rustfmt.toml | ||
| SECURITY.md | ||
lib-crc
lib-crc provides no-std CRC primitives for EriX storage and filesystem code:
reflected IEEE CRC-32, non-reflected IEEE CRC-32, and CRC-32C Castagnoli.
EriX is a clean-room, capability-based microkernel operating system written entirely in Rust. See ARCHITECTURE for the checksum contracts, ROADMAP for remaining work, and the project documentation for system design.
Purpose of This Repository
The library centralizes the CRC recurrences used by lib-partition and e2fsd.
It accepts borrowed byte slices and scalar seeds, returns scalar checksums, and
performs no allocation, I/O, storage parsing or capability operation.
The one-shot crc32_ieee and crc32c functions apply the standard initial state
and final xor. Their rolling update forms accept and return raw state; finalize
only after the last chunk. crc32_be_update preserves the non-reflected raw
state used by legacy journal checksums. Every byte value and raw seed is valid.
CRCs detect corruption; they do not authenticate input.
Build the source API documentation with
cargo doc --no-deps --document-private-items.
Clean-Room Policy
All implementation and test code must be original EriX work, derived from specifications and documented algorithms. No external Rust dependencies, copied implementations, or generators embedding third-party code are allowed. See CONTRIBUTING.
License
This repository uses the ISC License.
Development Model
Preserve checksum compatibility and the pure, allocation-free API. Follow the project priority order: security, reliability, then performance. Consider acceleration only after representative profiling establishes a bottleneck.
Validation
The crate has no dependency or feature variants beyond its empty default set. Run host checks and build the freestanding library without warnings:
cargo fmt --all -- --check
RUSTFLAGS="-D warnings" cargo clippy --all-targets --all-features -- -D warnings
RUSTFLAGS="-D warnings" cargo test --all-targets --all-features
RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" cargo test --doc --all-features
RUSTFLAGS="-D warnings" cargo build --lib --target x86_64-unknown-none --release
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features --document-private-items
The freestanding target must be installed in the selected Rust toolchain. Host unit tests and a freestanding compilation do not establish a guest build.
Governance Principles
Keep public checksum semantics narrow and documented. Changes to polynomial,
reflection, initialization or final xor require coordinated consumer updates.
Shared governance files remain identical to meta; component documentation
uses its formats with checksum-specific content.
Library Boundaries
The library borrows only the supplied bytes during a call and retains no caller state or authority. Storage validation, byte-order conversion, input-size budgets and authentication belong to consumers. No runtime service or device discovery belongs in this crate.
Contact
Discuss changes in the EriX organization. Contact admin@erikinkinen.fi for governance matters and follow SECURITY for private security reports.