Skip to content

chore: pin Rust toolchain, set MSRV 1.88.0, add MSRV guide#68

Open
munendrasn wants to merge 5 commits into
salesforce-misc:mainfrom
munendrasn:chore/pin-rust-toolchain
Open

chore: pin Rust toolchain, set MSRV 1.88.0, add MSRV guide#68
munendrasn wants to merge 5 commits into
salesforce-misc:mainfrom
munendrasn:chore/pin-rust-toolchain

Conversation

@munendrasn
Copy link
Copy Markdown
Collaborator

@munendrasn munendrasn commented Apr 24, 2026

Summary

  • Add rust-toolchain.toml tracking latest stable with clippy and rustfmt
  • CI reads toolchain from rust-toolchain.toml via rustup show
  • Set MSRV to 1.88.0 in [workspace.package], inherited by both crates
  • Add MSRV section to DEVELOPER.md covering how to find and verify MSRV

Test plan

  • CI passes with rustup show reading rust-toolchain.toml
  • cargo +1.88.0 check verifies MSRV

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.
Comment thread rust-toolchain.toml Outdated
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.95.0"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is channel = "stable" better?
@munendrasn @jakeswenson - can u pl. help me understand what is the standard practice here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(yes, pl. go ahead; i was trying to make my reviewer clone and it responded as different review comment:
#68 (review))

Copy link
Copy Markdown
Collaborator

@SreeramGarlapati SreeramGarlapati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. rust-toolchain.toml: change channel = "1.95.0"channel = "stable"
  2. crates/merutable/Cargo.toml: add rust-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.

@munendrasn munendrasn changed the title chore: pin Rust toolchain to 1.95.0 chore: pin Rust toolchain, set MSRV 1.88.0, add MSRV guide Apr 26, 2026
@munendrasn
Copy link
Copy Markdown
Collaborator Author

munendrasn commented Apr 26, 2026

crates/merutable/Cargo.toml: add rust-version = "1.88.0" to the [package] section

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

@munendrasn
Copy link
Copy Markdown
Collaborator Author

PR #80 for edition upgrade. Once this PR is merged, need to rebase the other PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants