feat(nix): migrate to crane for Rust builds#128
Draft
billf wants to merge 3 commits into
Draft
Conversation
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
billf
force-pushed
the
billf/chore-nix-move-to-crane
branch
2 times, most recently
from
January 10, 2026 00:19
68cd63f to
ba36476
Compare
Add crane (github:ipetkov/crane) for building and testing the Rust workspace. Crane provides incremental builds by caching dependencies separately from source changes. Key changes: - Add `nix/crane.nix` module with craneLib setup using fenix toolchain - `cargoArtifacts` via `buildDepsOnly` enables dependency caching - Expose crane checks: `cargo-fmt`, `cargo-clippy`, `cargo-nextest` - Export `packages.default` as the crane-built crate - Use `craneLib.devShell` with `inputsFrom` for inherited build inputs - Include musl target configuration on Linux for static linking Benefits: - Faster CI via cached dependency artifacts - `nix flake check` runs fmt, clippy, nextest, and build - Shared artifacts between clippy, nextest, and coverage derivations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
billf
force-pushed
the
billf/chore-nix-move-to-crane
branch
from
January 10, 2026 00:38
ba36476 to
87cf5cc
Compare
Pin to LLVM 18 bintools for stability with WIT-generated symbol names containing '@' characters. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
billf
force-pushed
the
billf/chore-nix-move-to-crane
branch
from
January 10, 2026 00:52
87cf5cc to
334d0ed
Compare
Code Coverage Report
Minimum allowed coverage is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add crane (github:ipetkov/crane) for building and testing the Rust
workspace. Crane provides incremental builds by caching dependencies
separately from source changes.
Key changes:
nix/crane.nixmodule with craneLib setup using fenix toolchaincargoArtifactsviabuildDepsOnlyenables dependency cachingcargo-fmt,cargo-clippy,cargo-nextestpackages.defaultas the crane-built cratecraneLib.devShellwithinputsFromfor inherited build inputsBenefits:
nix flake checkruns fmt, clippy, nextest, and buildCo-Authored-By: Claude Opus 4.5 noreply@anthropic.com