From d03a7069ad74a84ccca8a270c019a555384e60ee Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Wed, 7 May 2025 20:11:58 +0200 Subject: [PATCH] Add instructions on how to upgrade to a newer Rust version (#17928) --- CONTRIBUTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 15f961e7d8..9281bd1086 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -366,6 +366,15 @@ uvx --from ./python/ruff-ecosystem ruff-ecosystem format ruff "./target/debug/ru See the [ruff-ecosystem package](https://github.com/astral-sh/ruff/tree/main/python/ruff-ecosystem) for more details. +## Upgrading Rust + +1. Change the `channel` in `./rust-toolchain.toml` to the new Rust version (``) +1. Change the `rust-version` in the `./Cargo.toml` to ` - 2` (e.g. 1.84 if the latest is 1.86) +1. Run `cargo clippy --fix --allow-dirty --allow-staged` to fix new clippy warnings +1. Create and merge the PR +1. Bump the Rust version in Ruff's conda forge recipe. See [this PR](https://github.com/conda-forge/ruff-feedstock/pull/266) for an example. +1. Enjoy the new Rust version! + ## Benchmarking and Profiling We have several ways of benchmarking and profiling Ruff: