diff --git a/nix/rust.nix b/nix/rust.nix index 99ab07a5..0ea9a604 100644 --- a/nix/rust.nix +++ b/nix/rust.nix @@ -40,11 +40,11 @@ rec { fileset = craneLib.fileset.commonCargoSources ../.; }; - # Build the workspace's dependency tree once, cached as its own - # derivation. Package builds and checks reuse this via - # `inherit cargoArtifacts;` so a workspace-only edit doesn't rebuild - # deps. All consumers use the same `cleanSrc` so the input hash - # stays consistent across the chain. + # The workspace's dependency tree, built once and cached as its own + # derivation so a workspace-only edit doesn't rebuild deps. Every + # consumer passes the same `cleanSrc`, keeping the input hash + # consistent across the chain. + # # Two dep caches, one per audience, and the split is not premature: # crane's `buildDepsOnly` defaults `doCheck = true`, which adds # `--all-targets` to the check and a `cargo test --no-run`, so the cache