Declare MSRV (currently 1.85)#371
Conversation
Since we already are using edition 2024, this workspace uses Cargo resolver v3. Therefore, once we declare the MSRV, Cargo will automatically ensure that all dependencies also support it. Another benefit is that tools like `cargo clippy` will no longer complain about possible improvements that are not supported by the MSRV. The policy adopted is to follow MSRV of the Scylla Rust Driver, which is currently set to 1.85.
There was a problem hiding this comment.
Pull Request Overview
This PR establishes a Minimum Supported Rust Version (MSRV) of 1.85 for the project by declaring it in Cargo.toml and updating the documentation to reference the ScyllaDB Rust Driver's MSRV requirements.
- Adds
rust-version = "1.85"to Cargo.toml to declare MSRV - Updates building.md documentation to reference the ScyllaDB Rust Driver's MSRV on crates.io instead of maintaining a hardcoded version
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scylla-rust-wrapper/Cargo.toml | Adds rust-version field declaring MSRV as 1.85 |
| docs/source/topics/building.md | Updates documentation to reference dynamic MSRV from ScyllaDB Rust Driver |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
docs/source/topics/building.md
Outdated
|
|
||
| * Compilers: | ||
| - rustc 1.82+ (as part of the Rust toolchain, available at [rustup.rs]); | ||
| - rustc (as part of the Rust toolchain, available at [rustup.rs]). The minimum supported version is derived from ScyllaDB Rust Driver - see [its entry on crates.io](https://crates.io/crates/scylla) for details (_Metadata_ box on the right side, _"Minimum Supported Rust Version"_). |
There was a problem hiding this comment.
[nitpick] The sentence structure is unclear and could be confusing. Consider revising to: 'rustc (as part of the Rust toolchain, available at [rustup.rs]). The minimum supported version is derived from the ScyllaDB Rust Driver - see its entry on crates.io for details (check the Metadata box on the right side for Minimum Supported Rust Version).'
| - rustc (as part of the Rust toolchain, available at [rustup.rs]). The minimum supported version is derived from ScyllaDB Rust Driver - see [its entry on crates.io](https://crates.io/crates/scylla) for details (_Metadata_ box on the right side, _"Minimum Supported Rust Version"_). | |
| - rustc (as part of the Rust toolchain, available at [rustup.rs]). The minimum supported version is derived from the ScyllaDB Rust Driver - see [its entry on crates.io](https://crates.io/crates/scylla) for details (check the _Metadata_ box on the right side for _Minimum Supported Rust Version_). |
There was a problem hiding this comment.
This doesn't convince me.
As in the past we would take advantage of new Rust features, we prefer to retain this flexibility by not declaring a specific MSRV in the user-facing documentation. Instead, we now simply state that the officially supported version is the most recent stable, and that older versions may work, but we don't guarantee that. This leaves us the freedom to use new Rust features as needed, by simply bumping the MSRV in Cargo.toml as needed.
a6d8fa9 to
4bb7d64
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Lorak-mmk
left a comment
There was a problem hiding this comment.
Please update PR description.
This PR sets
rust-versionin Cargo.toml to the lowest possible MSRV (1.85) that supports Rust edition 2024, which is currently used in the project. The same version happens to be the current MSRV of the Rust Driver.Because Clippy is now MSRV-aware, it no longer complains - because the fixes require Rust version that is higher than the MSRV - so the CI now passes.
Additionally, the
building.mdbullet about supportedrustcversions now claims our support only for the most recent stable Rust version. This will allow bumping MSRV freely in case a new useful feature is released, as we would do in the past.Pre-review checklist
[ ] I have implemented Rust unit tests for the features/changes introduced.[ ] I have enabled appropriate tests inMakefilein{SCYLLA,CASSANDRA}_(NO_VALGRIND_)TEST_FILTER.[ ] I added appropriateFixes:annotations to PR description.