From 2fbbe76fcb7fed9575884e197656e6053a3bf190 Mon Sep 17 00:00:00 2001 From: Nazz-Source Date: Fri, 23 Oct 2026 15:56:49 +0100 Subject: [PATCH] fix: [devex] Pin the Rust toolchain (#159) --- CONTRIBUTING.md | 12 +++++++++--- rust-toolchain.toml | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b542e2a..a72afa7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,8 +28,15 @@ ask in the thread — it's cheaper than a PR that has to be reworked. ## Development Setup -Prerequisites: a stable Rust toolchain, the `wasm32v1-none` target (for the -contract), and Node.js 22+ (for `client/`). +Prerequisites: the Rust toolchain pinned in `rust-toolchain.toml` (installed +automatically by `rustup` on first use, with `rustfmt`, `clippy` and the +`wasm32v1-none` target), and Node.js 22+ (for `client/`). + +The Rust toolchain is pinned so that a new stable release cannot silently +introduce new clippy lints and break CI. To bump it, update the `channel` +version in `rust-toolchain.toml` in a dedicated PR, run `cargo fmt`, +`cargo clippy --workspace --all-targets --locked -- -D warnings` and +`cargo test --workspace --locked`, and fix any new lints in the same PR. ```bash rustup target add wasm32v1-none @@ -118,7 +125,6 @@ make sure your PR references the issue it closes (see [Pull Requests](#pull-requests)). ## Pull Requests -======= - One issue per PR where possible, with `Closes #N` in the description. - Keep CI green: fmt, clippy, tests, the wasm build, and the client diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..c761092 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,5 @@ +[toolchain] +channel = "1.89.0" +components = ["rustfmt", "clippy"] +targets = ["wasm32v1-none", "wasm32-unknown-unknown"] +profile = "minimal"