Skip to content

chore: pin Rust toolchain to 1.94.0 and declare MSRV#8

Open
orrinfrazier wants to merge 1 commit into
mainfrom
fix/s06-1-msrv-toolchain-pin
Open

chore: pin Rust toolchain to 1.94.0 and declare MSRV#8
orrinfrazier wants to merge 1 commit into
mainfrom
fix/s06-1-msrv-toolchain-pin

Conversation

@orrinfrazier
Copy link
Copy Markdown
Owner

@orrinfrazier orrinfrazier commented May 24, 2026

Closes #18

Summary

  • Pins the Rust toolchain to 1.94.0 via a new root rust-toolchain.toml and declares an MSRV of 1.94 via [workspace.package].rust-version, inherited by all 30 member crates.
  • Updates ci.yml, release.yml, and deny.yml so non-Guix CI and the public release binaries stop floating on whatever stable is current at run time.
  • Implements issues/S06-1-msrv-toolchain-pin.md.

Why

Without a pinned toolchain, a new stable release can silently break CI or change release-binary output, reproducible builds can't be guaranteed for the non-Guix matrix, and contributors/distros have no declared minimum supported Rust version.

Changes

  • rust-toolchain.toml (new): channel = "1.94.0", components rustfmt + clippy.
  • [workspace.package].rust-version = "1.94" + rust-version.workspace = true on every member crate (scripted across 30 manifests). cargo metadata reports rust_version = 1.94 for all 30 members.
  • Workflows: every toolchain: stabletoolchain: 1.94.0 (with a sync comment). dtolnay/rust-toolchain does not read rust-toolchain.toml, so the version is named explicitly in each workflow. doc.yml and fuzz.yml remain on nightly intentionally (cargo-doc features / cargo-fuzz).
  • MSRV policy: set equal to the pin (latest-stable-only), documented inline — not a fabricated lower bound (no MSRV-verification CI job exists to back one).
  • constants/src/lib.rs: a std-only #[cfg(test)] mod toolchain_pin that locks the invariants — globs all .github/workflows/*.yml (asserting no toolchain: stable, pinned version everywhere, nightly workflows allowlisted) and iterates all workspace members (asserting each inherits the MSRV). Globbing/iterating rather than sampling means a future job left on stable or a new crate missing inheritance is caught.

How to test

cargo test -p cuprate-constants toolchain_pin     # 4/4 green
cargo metadata --format-version 1 --no-deps        # every member rust_version = 1.94
cargo fmt -p cuprate-constants --check
cargo clippy -p cuprate-constants --all-targets --all-features -- -D warnings

The drift guard was verified negatively: injecting a workflow on toolchain: stable and removing inheritance from a member each make the corresponding test fail.

Review notes

Reviewed via 3-way cross-family consensus (Claude + Gemini + Codex, opus adjudicator). Consensus strengthened the drift-guard test from a hardcoded 3-file/3-crate sample to globbing all workflows + iterating all members. Rejected with rationale: pinning doc.yml/fuzz.yml to 1.94.0 (nightly is required there), removing/faking a lower MSRV, and adding the wasm32 target to rust-toolchain.toml (CI installs it per-job; global cost not justified).

Add a `rust-toolchain.toml` pinning the toolchain to 1.94.0 and set
`[workspace.package].rust-version = "1.94"`, inherited by all 30 member
crates, so non-Guix CI and the public release binaries no longer float on
whatever `stable` is current at run time.

- rust-toolchain.toml: channel = "1.94.0" + rustfmt/clippy components
- [workspace.package].rust-version = "1.94" (MSRV tracks the pin by a
  latest-stable-only policy, documented inline)
- rust-version.workspace = true added to every member crate
- ci.yml / release.yml / deny.yml: `toolchain: stable` -> `1.94.0`
  (dtolnay/rust-toolchain does not read rust-toolchain.toml, so the
  version is named in each workflow; doc.yml + fuzz.yml stay nightly)
- constants: a std-only test guarding the pin/MSRV invariants, globbing
  all workflows (allowlisting nightly) and iterating every member so a
  new job left on stable or a crate missing inheritance is caught

Implements issues/S06-1-msrv-toolchain-pin.md.
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.

No MSRV / pinned Rust toolchain for non-Guix builds

1 participant