Skip to content

Tracking: cold adoption of devkit by a Rust project #1833

Open
1 of 5 issues completed
Open

Description

@gerchowl

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

Correctness once adopted

Hit by Rust adopters, but not Rust-specific

Release (later)

Settled, for reference

Done when

A cold install.sh --mode direnv on a repo with Cargo.toml yields:

  • a flake on mkRustProject that passes its own hooks and honours .vig-os;
  • just lint/just test that compile and test the crate;
  • docs that point there.

All of it with no hand-written Rust plumbing.

Sub-issues

Sub-issues

1 of 5 Issues completed
Loading 5 sub-issues

Activity

  1. added
    feature
    priority:medium
    area:workspace
    effort:large
    on Oct 5, 2026
  2. gerchowl commented on Oct 5, 2026

    @gerchowl
    ContributorAuthor

    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):

    1. mkRustProject drops the .vig-os hook knobs, so the Rust scaffold fails deadnix/statix #1810: mkRustProject forwards the .vig-os hook settings. Lands first, because the template in step 3 depends on it.
    2. mkRustProject: per-test exclusion seam for tests the Nix sandbox cannot run (PTY, signals, process groups) #1834 (new, split out of the open sandbox question above): per-test exclusion seam for tests the Nix sandbox can't run.
    3. Rust pack: L1/L4/L7 never shipped — the pack cannot be adopted cold #1496: L7 #rust template, L1 statics, L4 justfile.project seeding. Removes the consumer-matrix EXPECTED_FAIL[rust] marker.
    4. Docs: MIGRATION.md says the rust module is unshipped and steers Rust adopters away from mkRustProject #1831: docs point Rust adopters at the pack.
    5. Upgrade preflight: untracked build output blocks the upgrade that would add its .gitignore fragment #1826: upgrade preflight no longer counts build output as a dirty tree.
    6. direnv flake template: package consumers inherit devkit's whole input tree via nixpkgs.follows = vigos/nixpkgs #1832: direnv flake template input direction for projects that ship packages.

    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.

  3. gerchowl commented on Oct 5, 2026

    @gerchowl
    ContributorAuthor

    The stack is open, bottom to top. Each PR bases on the one above it, and the bottom PR bases on dev:

    # PR Issue
    1 #1835 fix(nix): forward the .vig-os hook knobs through mkRustProject #1810
    2 #1836 feat(nix): sandboxExcludes for mkRustProject's nextest check #1834
    3 #1837 feat: seed the Rust pack on cold adoption (cargo recipes, tool configs, mkRustProject flake, #rust template) #1496 (+ #1810's scaffold half)
    4 #1838 docs: point Rust adopters at the Rust pack #1831
    5 #1839 fix: upgrade preflight passes untracked output the upgrade will ignore #1826
    6 #1840 docs: how a flake consumes a devkit project's packages #1832

    How the "done when" bar is met: the consumer matrix's new rust-flake cell runs exactly that path on every PR. It renders a cold --mode direnv scaffold of a Cargo repo, runs nix flake check on the seeded mkRustProject flake (fmt/clippy/nextest/doctest/doc/deny/package), runs the first-commit hooks, then just sync/lint/test inside the flake's shell, which must prove the crate's test ran. The rust cell's EXPECTED_FAIL marker is removed.

    After final review, the stack merges into dev and goes out as the next release candidate.

  4. gerchowl commented on Oct 5, 2026

    @gerchowl
    ContributorAuthor

    The whole stack (#1835–#1840) is merged into dev after final review, all green.

    prepare-release cut release/1.19.0. Release PR #1841 to main has c-vigo as reviewer. 1.19.0-rc1 gets 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).

  5. gerchowl commented on Dec 1, 2026

    @gerchowl
    ContributorAuthor

    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:

    What worked well: deny.toml, clippy.toml, rustfmt.toml, mkRustProject's check suite once the fixtures are included, and .vig-os profile keys once seeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workspaceeffort:largefeaturepriority:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions