Repository navigation
Open
1 / 51 of 5 issues completedLabels
area:workspaceWorkspace tooling, justfile, templateseffort:largeMore than 4 hours or multi-sessionfeatureNew feature or requestpriority:mediumImportant but not urgent
Description
Tracking issue for adopting devkit as a Rust consumer: one place to see what blocks a cold Rust adoption, ordered by what an adopter hits first.
Context
The Rust pack shipped as a library (nix/modules/rust.nix plus lib.mkRustProject, #1429 / #1452), but the path into it did not. The most recent cold adoption (direnv mode, trunk workflow, solo profile) never found the pack. It hand-rolled pkgs.cargo/rustc in extraPackages, custom cargo fmt/clippy hooks, justfile.project recipes and a buildRustPackage derivation, which works but bypasses the pack's check suite. The items below are why.
Entry point and discoverability
- Rust pack: L1/L4/L7 never shipped — the pack cannot be adopted cold #1496: L1/L4/L7 never shipped. There is no
nix flake init -t #rust, no baserustfmt/clippy/denystatics, and no Rustjustfile.projectseeding, so a Rust repo'sjust testis a silent green no-op until the adopter rewrites it. - Docs: MIGRATION.md says the rust module is unshipped and steers Rust adopters away from mkRustProject #1831: MIGRATION.md says
rustis an unshipped candidate module and recommendsextraPackages = [ pkgs.cargo pkgs.rustc ], which steers adopters away frommkRustProject.
Correctness once adopted
- mkRustProject drops the .vig-os hook knobs, so the Rust scaffold fails deadnix/statix #1810:
mkRustProjectdrops the.vig-oshook settings (branchTypes/commitTypes/refsPolicy/refsOptionalTypes), so a Rust scaffold fails deadnix/statix, and e.g.DEVKIT_REFS_POLICY=optionalsilently stops reaching the local commit-msg hook. - Open question, to settle in Rust pack: L1/L4/L7 never shipped — the pack cannot be adopted cold #1496 or a new issue:
mkRustProject's nextest/doctest checks run inside the Nix build sandbox. Suites that need a PTY, process groups or signals (CLI wrappers, supervisors) can't run there, and on darwin the sandbox is stricter still. The pack should document, or provide, a per-test exclusion seam that keeps such tests injust test/CI rather thannix flake check.
Hit by Rust adopters, but not Rust-specific
- Upgrade preflight: untracked build output blocks the upgrade that would add its .gitignore fragment #1826: the upgrade preflight treats untracked
target/as dirty, blocking the upgrade that adds the Rust.gitignorefragment. - direnv flake template: package consumers inherit devkit's whole input tree via nixpkgs.follows = vigos/nixpkgs #1832: the direnv flake template's
nixpkgs.follows = "vigos/nixpkgs"makes every flake that consumes a Rust project'spackagesinherit devkit's whole input tree.
Release (later)
- [FEATURE] Rust pack L6: seed templates for the three release seams (cargo set-version, publish dry-run, cargo publish --workspace + Trusted Publishing) #1748: L6 release-seam templates (
cargo set-version, publish dry-run,cargo publish --workspacewith Trusted Publishing). - [FEATURE] Binaries publish lane: managed cargo-dist asset builder into the train draft #1783: binaries publish lane (managed cargo-dist asset builder into the train draft).
Settled, for reference
- Rust language pack — and reconciling devkit with gerchowl/guardrails #1400 (pack design), Decision: where do a capability module's CHECKS live — lib function or a v2 contract field? #1427 (where checks live), Rust pack: four consumer-hardening fixes from the second consumer #1450 (consumer hardening), guardrails as a capability module — the semantic-gate half of #1400 #1488 (guardrails module), Release train: first-class Rust release extension (crates.io, cargo-dist binaries, wheels) via a general publish/Release-owner seam #1746 (release extension seam).
- [BUG] Scaffold codeql.yml: hardcoded python matrix + conflicts with GitHub default code-scanning setup #1025: CodeQL has no Rust leg, by decision.
Done when
A cold install.sh --mode direnv on a repo with Cargo.toml yields:
- a flake on
mkRustProjectthat passes its own hooks and honours.vig-os; just lint/just testthat compile and test the crate;- docs that point there.
All of it with no hand-written Rust plumbing.
Sub-issues
Collapse Sub-issuesSub-issues
Loading 5 sub-issues
Metadata
Metadata
Assignees
Labels
area:workspaceWorkspace tooling, justfile, templateseffort:largeMore than 4 hours or multi-sessionfeatureNew feature or requestpriority:mediumImportant but not urgent
Activity
gerchowl commentedon Oct 5, 2026
Working through this list as one PR stack into
dev, which then goes out as the next release candidate.Stack order (each PR bases on the one before):
mkRustProjectforwards the.vig-oshook settings. Lands first, because the template in step 3 depends on it.#rusttemplate, L1 statics, L4justfile.projectseeding. Removes the consumer-matrixEXPECTED_FAIL[rust]marker.Deferred: #1748 and #1783 stay under "Release (later)". They are blocked on #1778 and #1786 (the publish-lane skeleton and the asset builder), and the cold-adoption "done when" bar doesn't need them.
gerchowl commentedon Oct 5, 2026
The stack is open, bottom to top. Each PR bases on the one above it, and the bottom PR bases on
dev:fix(nix): forward the .vig-os hook knobs through mkRustProjectfeat(nix): sandboxExcludes for mkRustProject's nextest checkfeat: seed the Rust pack on cold adoption (cargo recipes, tool configs, mkRustProject flake,#rusttemplate)docs: point Rust adopters at the Rust packfix: upgrade preflight passes untracked output the upgrade will ignoredocs: how a flake consumes a devkit project's packagesHow the "done when" bar is met: the consumer matrix's new
rust-flakecell runs exactly that path on every PR. It renders a cold--mode direnvscaffold of a Cargo repo, runsnix flake checkon the seededmkRustProjectflake (fmt/clippy/nextest/doctest/doc/deny/package), runs the first-commit hooks, thenjust sync/lint/testinside the flake's shell, which must prove the crate's test ran. Therustcell'sEXPECTED_FAILmarker is removed.After final review, the stack merges into
devand goes out as the next release candidate.fix(nix): forward the .vig-os hook knobs through mkRustProject (#1835)
feat(nix): add sandboxExcludes to mkRustProject's nextest check (#1836)
feat: seed the Rust pack on cold adoption (cargo recipes, tool config…
docs: point Rust adopters at the Rust pack instead of a bare compiler (…
fix: let the upgrade preflight pass untracked output the upgrade will…
docs: document how a flake consumes a devkit project's packages (#1840)
gerchowl commentedon Oct 5, 2026
The whole stack (#1835–#1840) is merged into
devafter final review, all green.prepare-releasecutrelease/1.19.0. Release PR #1841 tomainhas c-vigo as reviewer.1.19.0-rc1gets published once #1841's CI is fully green.The Rust-adoption items here close when 1.19.0 lands on
main. #1748 and #1783 stay open ("Release (later)", blocked on #1778/#1786).gerchowl commentedon Dec 1, 2026
Another cold Rust adoption (devkit 1.19.2, 2026-12-01): a private multi-crate workspace with its own large justfile, pre-commit hooks and CI. Findings, filed or +1'd:
rust-version = 1.95can't be built from fleet nixpkgs.unwrap_used/expect_usedlint levels aren't seeded, and the test-helper exemption isn't documented.DEVKIT_FEATURES_DISABLED, overwrites an existingjustfile, and has no merge path for an existing pre-commit config.extraSrcFiles.What worked well:
deny.toml,clippy.toml,rustfmt.toml,mkRustProject's check suite once the fixtures are included, and.vig-osprofile keys once seeded.