From 49d7fca0b725a0a261cda09bf5e924102c84fe31 Mon Sep 17 00:00:00 2001 From: bQUARKz Date: Tue, 10 Nov 2026 22:39:19 +0000 Subject: [PATCH] chore(toolchain): pin Rust to 1.98.1 --- .github/workflows/ci.yml | 7 ++-- README.md | 12 ++++++- ...ne-source-for-the-rust-compiler-version.md | 35 +++++++++++++++++++ rust-toolchain.toml | 2 +- 4 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 discussion/lessons/DSC-0071-rust-toolchain-pin/LSN-0075-one-source-for-the-rust-compiler-version.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bbf2385..7e3103d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,10 @@ jobs: with: submodules: recursive - - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt, clippy, llvm-tools-preview + - name: Install repository Rust toolchain + run: | + toolchain=$(python3 -c 'import tomllib; print(tomllib.load(open("rust-toolchain.toml", "rb"))["toolchain"]["channel"])') + rustup toolchain install "$toolchain" --profile minimal - uses: Swatinem/rust-cache@v2 diff --git a/README.md b/README.md index ec81e0a..ca4a821 100644 --- a/README.md +++ b/README.md @@ -60,11 +60,21 @@ Other ecosystem commands, such as build, pack, and verification tooling, are not ## Requirements -- Rust toolchain from [rust-toolchain.toml](rust-toolchain.toml) +- Rust **1.98.1**, pinned in [rust-toolchain.toml](rust-toolchain.toml) - `rustup` for toolchain installation and management - `cargo-llvm-cov` for coverage targets such as `make coverage` and `make ci-domains` - a local graphical environment for desktop runtime commands +From the repository root, install and verify the pinned toolchain: + +```bash +rustup toolchain install 1.98.1 --profile minimal --component rustfmt,clippy +rustc --version +``` + +Rustup selects the pinned version automatically for commands run in this repository. +CI installs the toolchain from the same file. + ## Quick Start Build the workspace: diff --git a/discussion/lessons/DSC-0071-rust-toolchain-pin/LSN-0075-one-source-for-the-rust-compiler-version.md b/discussion/lessons/DSC-0071-rust-toolchain-pin/LSN-0075-one-source-for-the-rust-compiler-version.md new file mode 100644 index 0000000..df07a20 --- /dev/null +++ b/discussion/lessons/DSC-0071-rust-toolchain-pin/LSN-0075-one-source-for-the-rust-compiler-version.md @@ -0,0 +1,35 @@ +--- +id: LSN-0075 +ticket: rust-toolchain-pin +title: One source for the Rust compiler version +created: 2026-11-10 +tags: [tooling, ci] +--- + +## Published configuration + +Historical source: accepted DEC-0070, implemented through PLN-0201 from AGD-0074. +The selected compiler is Rust 1.98.1 in +[rust-toolchain.toml](../../../rust-toolchain.toml), with installation instructions +in the [README](../../../README.md#requirements). No runtime spec changed. + +## A moving channel does not preserve a tested environment + +`stable` can resolve to different compilers across machines and installation +dates. An exact version preserves the compiler used in existing qualifications. +Cargo's `rust-version` expresses a minimum and does not replace that selection. + +The [CI workflow](../../../.github/workflows/ci.yml) reads the channel from the +toolchain file and passes it explicitly to `rustup toolchain install`, avoiding +another version literal to update. Implicit installation encountered cache rename +errors during verification; explicit installation recognized the existing compiler +and components. The shared provisioner installs formatting, Clippy and coverage +components before the quality gate. + +## Evidence and limits + +On macOS aarch64, the numbered toolchain selected rustc/cargo 1.98.1. Workspace +formatting and `cargo check --workspace --all-targets --all-features --locked` +passed. Explicit installation and CI version extraction also passed. This controls +compiler drift; it does not establish the cause or resolution of the original +Linux compatibility failure. diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 73cb934..68c0ea2 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "stable" +channel = "1.98.1" components = ["rustfmt", "clippy"]