diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bb75b5c..e7d545b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,8 +9,17 @@ open a PR that references it. Prerequisites: a stable Rust toolchain, the `wasm32v1-none` target (for the contract), and Node.js 22+ (for `client/`). -```bash -rustup target add wasm32v1-none +The Rust toolchain, its components (`rustfmt`, `clippy`), and the `wasm32v1-none` +target are pinned in [`rust-toolchain.toml`](rust-toolchain.toml). When using +`rustup`, invoking any `cargo` command inside the repo automatically installs +and selects the pinned version. + +### Bumping the Rust Toolchain +To bump the Rust version: +1. Update `channel = "..."` in `rust-toolchain.toml` to the new target version. +2. Run `cargo fmt --all -- --check` and `cargo clippy --workspace --all-targets --locked -- -D warnings` to verify new lints. +3. Verify tests and the wasm build: `cargo test --workspace --locked` and `cargo build -p deprader-router --target wasm32v1-none --release --locked`. +4. Update `PROGRESS.md` and submit a PR with the bump. # Off-chain toolkit + contract unit tests cargo test --workspace --locked diff --git a/PROGRESS.md b/PROGRESS.md index bab63fb..2d431eb 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -319,3 +319,11 @@ is closed — see [CONTRIBUTING.md](CONTRIBUTING.md). - **By:** ALLEN-AYODEJI - **Closes:** N/A - **Status:** Merged. + +### Devex — Pin the Rust toolchain + +- **What:** Adds `rust-toolchain.toml` pinning the Rust compiler channel to `1.94.1` with `rustfmt`, `clippy` components and the `wasm32v1-none` Soroban contract compilation target. Updates `CONTRIBUTING.md` with instructions on how contributors and maintainers can bump the pinned toolchain. +- **Verified:** `cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets --locked -- -D warnings`, `cargo test --workspace --locked`, and `cargo build -p deprader-router --target wasm32v1-none --release --locked` all pass under the pinned toolchain. +- **By:** dezzy-music +- **Closes:** #159 +- **Status:** PR open. diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..352f1f7 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,5 @@ +[toolchain] +channel = "1.94.1" +components = ["rustfmt", "clippy"] +targets = ["wasm32v1-none"] +profile = "minimal"