diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index f3c8bb8d..79370015 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -6,7 +6,7 @@ **Key Facts:** - **Language:** Rust (edition 2024) - - **MSRV:** 1.86.0 (Minimum Supported Rust Version) + - **MSRV:** 1.87.0 (Minimum Supported Rust Version) - **Size:** ~6,000 lines of source code, ~4,400 lines of tests - **Type:** Library crate (no binary) - **Dependencies:** Minimal (num-traits, indexmap, rustc-hash, integer-sqrt, thiserror, deprecate-until) @@ -15,7 +15,7 @@ ## Build and Validation Commands ### Prerequisites - All commands should be run from the repository root. The project requires Rust toolchain (stable, beta, nightly, or MSRV 1.86.0). + All commands should be run from the repository root. The project requires Rust toolchain (stable, beta, nightly, or MSRV 1.87.0). ### Essential Commands (In Order) @@ -99,7 +99,7 @@ ## Project Structure ### Root Directory Files - - `Cargo.toml` - Project manifest with dependencies, MSRV (rust-version = "1.86.0"), and linting configuration + - `Cargo.toml` - Project manifest with dependencies, MSRV (rust-version = "1.87.0"), and linting configuration - `Cargo.lock` - Locked dependency versions - `README.md` - User-facing documentation - `CHANGELOG.md` - Version history @@ -166,6 +166,20 @@ 3. **codspeed.yml** (Runs on main branch pushes and PRs): - Runs performance benchmarks + ## MSRV (Minimum Supported Rust Version) + + When updating the MSRV, you must update it in the following locations: + 1. **Cargo.toml** - The `rust-version` field (line 14) + 2. **src/lib.rs** - Documentation comment stating "The minimum supported Rust version (MSRV) is Rust X.Y.Z" (line 89) + 3. **.github/copilot-instructions.md** - Three locations: + - "MSRV: X.Y.Z" in Key Facts section (line 9) + - "MSRV X.Y.Z" in Prerequisites section (line 18) + - "rust-version = X.Y.Z" in Root Directory Files section (line 102) + + **Note:** The GitHub Actions workflow (.github/workflows/tests.yml) automatically reads the MSRV from Cargo.toml, so it does not need manual updates. + + After updating the MSRV, always run `sh tests/check-msrv-consistency.sh` to verify that Cargo.toml and src/lib.rs are in sync. + ## Critical Validation Rules ### Before Committing diff --git a/Cargo.toml b/Cargo.toml index 9624be2b..258db6a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ authors = ["Samuel Tardieu "] categories = ["algorithms"] readme = "README.md" edition = "2024" -rust-version = "1.86.0" +rust-version = "1.87.0" include = [ "src/**/*", "tests/**/*", diff --git a/src/lib.rs b/src/lib.rs index 8bd5b551..cfd162f1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -86,7 +86,7 @@ //! in this context, you can wrap them into compliant types using the //! [ordered-float](https://crates.io/crates/ordered-float) crate. //! -//! The minimum supported Rust version (MSRV) is Rust 1.86.0. +//! The minimum supported Rust version (MSRV) is Rust 1.87.0. //! //! [A*]: https://en.wikipedia.org/wiki/A*_search_algorithm //! [BFS]: https://en.wikipedia.org/wiki/Breadth-first_search