chore: pin Rust toolchain, set MSRV 1.88.0, add MSRV guide#68
chore: pin Rust toolchain, set MSRV 1.88.0, add MSRV guide#68munendrasn wants to merge 5 commits into
Conversation
Add rust-toolchain.toml at the workspace root to pin the exact Rust version and required components (clippy, rustfmt). This gives local dev and CI a single source of truth — rustup reads the file automatically, so developers no longer need to manually select a version. CI switches from the dtolnay/rust-toolchain action to `rustup show`, which installs the pinned toolchain and components on the fly from the checked-in file. DEVELOPER.md updated to reference the toolchain file instead of a hardcoded minimum version.
| @@ -0,0 +1,3 @@ | |||
| [toolchain] | |||
| channel = "1.95.0" | |||
There was a problem hiding this comment.
is channel = "stable" better?
@munendrasn @jakeswenson - can u pl. help me understand what is the standard practice here?
There was a problem hiding this comment.
I looked more rust projects and how they handle this.
Most projects define the MSVR in cargo.toml - The min required version for this binary to be used - consumer facing
* The project yet doesn't define one.. from the local analysis cargo msrv find --min 1.56.0. The MSRV for this project is 1.88.0
I think we should define the MSRV for the project.
On the rust-toolchain.toml,
- Few of projects pin the version.
- pinned version brings predictability to develop and easier to collaborate and debug for any CI build fails but brings manual overhead
- Few other projects, either use nightly or stable - ensure latest changes are available for any CI builds and developers
We could go with using stable version and then later evaluate if pinned version is required. wdyt?
There was a problem hiding this comment.
(yes, pl. go ahead; i was trying to make my reviewer clone and it responded as different review comment:
#68 (review))
SreeramGarlapati
left a comment
There was a problem hiding this comment.
MSRV confirmed at 1.88.0 (floor set by time 0.3.47, darling 0.23.0, serde_with 3.18.0, home 0.5.12).
@munendrasn please make these two changes:
rust-toolchain.toml: changechannel = "1.95.0"→channel = "stable"crates/merutable/Cargo.toml: addrust-version = "1.88.0"to the[package]section
This gives us the clean split: rust-toolchain.toml governs local dev + CI components, rust-version in Cargo.toml protects downstream consumers.
Also please rebase on latest main — the branch is behind.
One minor deviation, I have setup version in workspace and then importing in individual crates - general recommendation and similar to dependencies As MSRV is 1.88, planning to update the edition 2024 and resolver to 3 in a new PR so that project benefits of from automatic handling of msrv + dependency conflicts |
|
PR #80 for edition upgrade. Once this PR is merged, need to rebase the other PR |
Summary
rust-toolchain.tomltracking latest stable with clippy and rustfmtrust-toolchain.tomlviarustup show[workspace.package], inherited by both cratesDEVELOPER.mdcovering how to find and verify MSRVTest plan
rustup showreadingrust-toolchain.tomlcargo +1.88.0 checkverifies MSRV