These instructions cover the commands we run locally to validate the workspace. All commands assume you are at the repository root.
- Rust toolchain 1.70 or newer (managed with
rustup). - The
wasm32target is not required; all crates compile natively.
Run every unit and integration test across all crates:
cargo test --workspaceAs of October 2025 this executes roughly 190 checks, including:
- 83 unit tests and 39 integration tests inside
cardano-crypto-class - VRF golden tests fed from
test_vectors/ - Slotting arithmetic tests in
cardano-slotting - Strictness helpers in
cardano-strict-containers,deepseq, andnothunks
To focus on a single crate:
cargo test -p cardano-crypto-class
cargo test -p cardano-slottingMany integration tests live under cardano-crypto-class/tests/. Pass -- --nocapture if
you need to see diagnostic output while exploring failures.
cargo fmt --all
cargo clippy --workspace --all-targets -- -D warningsFormatting uses the repository rustfmt.toml. Clippy warnings are elevated to errors so
new code lands clean.
Generate Rustdoc for the entire workspace:
cargo doc --workspace --no-depsRefer to the rendered docs at target/doc/index.html. Building documentation is
especially useful after modifying public APIs in cardano-crypto-class or
cardano-vrf-pure.
- Dependency audit:
cargo deny check(configuration lives indeny.toml). - Security advisories:
cargo audit(install viacargo install cargo-audit). - Binary size comparison: use
cargo bloatwhen optimising cryptographic code paths.
- Keep deterministic seeds and test vectors under
test_vectors/to avoid drift. - Prefer integration tests for cross-crate behaviour (e.g. DSIGN + KES interactions).
- When updating algorithms or byte formats, update the documentation in
docs/cryptography.mdalongside the tests.