22#
33# The recipes make heavy use of `rustup`'s toolchain syntax (e.g. `cargo +nightly`). `rustup` is
44# required on the system in order to intercept the `cargo` commands and to install and use the appropriate toolchain with components.
5+ #
6+ # The root directory of this workspace is "virtual", it has no source code itself, just a holder of crates. This means
7+ # the cargo commands generally run on all the child crates by default without the `--workspace` flag.
58
69NIGHTLY_TOOLCHAIN := " nightly-2025-07-10"
710STABLE_TOOLCHAIN := " 1.88.0"
@@ -18,27 +21,28 @@ STABLE_TOOLCHAIN := "1.88.0"
1821
1922# Verify check, fails if anything is off. Good for CI.
2023@_ check-verify :
21- # Cargo's wrapper for rustfmt predates workspaces, so uses the "--all" flag instead of "--workspaces".
22- cargo + {{ NIGHTLY_TOOLCHAIN}} fmt --check --all
24+ cargo + {{ NIGHTLY_TOOLCHAIN}} fmt --check
2325 # Lint all workspace members. Enable all feature flags. Check all targets (tests, examples) along with library code. Turn warnings into errors.
24- cargo + {{ NIGHTLY_TOOLCHAIN}} clippy --workspace --all-features --all-targets -- -D warnings
25- # Static analysis of types and lifetimes.
26- # Nightly toolchain required by benches target.
27- cargo + {{ NIGHTLY_TOOLCHAIN}} check --workspace --all-features --all-targets
26+ cargo + {{ NIGHTLY_TOOLCHAIN}} clippy --all-features --all-targets -- -D warnings
27+ # Static analysis of types and lifetimes. Nightly toolchain required by benches target.
28+ cargo + {{ NIGHTLY_TOOLCHAIN}} check --all-features --all-targets
2829 # Build documentation to catch any broken doc links or invalid rustdoc.
29- RUSTDOCFLAGS=" -D warnings" cargo + {{ STABLE_TOOLCHAIN}} doc --workspace -- all-features --no-deps
30+ RUSTDOCFLAGS=" -D warnings" cargo + {{ STABLE_TOOLCHAIN}} doc --all-features --no-deps
3031
3132# Attempt any auto-fixes for format and lints.
3233@_ check-fix :
3334 # No --check flag to actually apply formatting.
34- cargo + {{ NIGHTLY_TOOLCHAIN}} fmt --all
35+ cargo + {{ NIGHTLY_TOOLCHAIN}} fmt
3536 # Adding --fix flag to apply suggestions with --allow-dirty.
36- cargo + {{ NIGHTLY_TOOLCHAIN}} clippy --workspace -- all-features --all-targets --fix --allow-dirty -- -D warnings
37+ cargo + {{ NIGHTLY_TOOLCHAIN}} clippy --all-features --all-targets --fix --allow-dirty -- -D warnings
3738
38- # Run a test suite: features, msrv, constraints, or no-std.
39+ # Run a test suite: features, msrv, constraints, no-std, or all .
3940@ test suite = " features":
4041 just _test-{{ suite}}
4142
43+ # Run all test suites.
44+ @_ test-all : _test-features _test-msrv _test-constraints _test-no-std
45+
4246# Test library with feature flag matrix compatability.
4347@_ test-features :
4448 # Test the extremes: all features enabled as well as none. If features are additive, this should expose conflicts.
@@ -62,10 +66,10 @@ STABLE_TOOLCHAIN := "1.88.0"
6266 # Enabling "--all-features" so all dependencies are checked.
6367 # Clear any previously resolved versions and re-resolve to the minimums.
6468 rm -f Cargo.lock
65- cargo + {{ NIGHTLY_TOOLCHAIN}} check --workspace -- all-features -Z direct-minimal-versions
69+ cargo + {{ NIGHTLY_TOOLCHAIN}} check --all-features -Z direct-minimal-versions
6670 # Clear again and check the maximums by ignoring any rust-version caps.
6771 rm -f Cargo.lock
68- cargo + {{ NIGHTLY_TOOLCHAIN}} check --workspace -- all-features --ignore-rust-version
72+ cargo + {{ NIGHTLY_TOOLCHAIN}} check --all-features --ignore-rust-version
6973 rm -f Cargo.lock
7074
7175# Test no standard library support.
@@ -88,7 +92,7 @@ STABLE_TOOLCHAIN := "1.88.0"
8892 # Generate HTML coverage report.
8993 protocol/ fuzz/ coverage.sh {{ NIGHTLY_TOOLCHAIN}} {{ target}}
9094
91- # Add a release tag and publish to the upstream remote. Need write privileges on the repository .
95+ # Add a release tag and publish to the upstream remote. Requires write privileges.
9296@ tag crate version remote = " upstream":
9397 # Guardrails: on a clean main with updated changelog and manifest.
9498 if ! git diff --quiet || ! git diff --cached --quiet; then \
0 commit comments