Skip to content

build: cache cargo deps with crane#12

Merged
Mic92 merged 1 commit into
mainfrom
crane
Jun 23, 2026
Merged

build: cache cargo deps with crane#12
Mic92 merged 1 commit into
mainfrom
crane

Conversation

@Mic92

@Mic92 Mic92 commented Jun 23, 2026

Copy link
Copy Markdown
Owner

rustPlatform.buildRustPackage rebuilds every crate in Cargo.lock on
any source change. Splitting the build into crane's buildDepsOnly +
buildPackage keeps the ~300 dependency crates (incl. the harmonia git
deps and tonic-build) in their own derivation that only rebuilds when
Cargo.{toml,lock} change, taking incremental builds from ~3m to ~30s.

Bumps the harmonia rev past nix-community/harmonia#1091 so crane's
git-dep vendoring (which runs cargo package -l) no longer trips on
harmonia-store-ref-scan's missing README.

rustPlatform.buildRustPackage rebuilds every crate in Cargo.lock on
any source change.  Splitting the build into crane's buildDepsOnly +
buildPackage keeps the ~300 dependency crates (incl. the harmonia git
deps and tonic-build) in their own derivation that only rebuilds when
Cargo.{toml,lock} change, taking incremental builds from ~3m to ~30s.

Bumps the harmonia rev past nix-community/harmonia#1091 so crane's
git-dep vendoring (which runs cargo package -l) no longer trips on
harmonia-store-ref-scan's missing README.
@Mic92 Mic92 enabled auto-merge June 23, 2026 13:07
@Mic92 Mic92 merged commit 0442037 into main Jun 23, 2026
3 checks passed
@Mic92 Mic92 deleted the crane branch June 23, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant