Closed
Description
Call for testing
The MSRV-aware resolver part of this RFC is implemented and we are wanting to collect feedback in preparation for stabilization.
The goal is to allow you to manage your dependencies without having to manually ensure they are compatible with your rust-version
- When stabilized, this will be opt-in. When upgrading to the 2024 Edition, it will be the opt-out.
- It uses
package.rust-version
if set, otherwiserustc --version
- It won't fail if there isn't a MSRV-compatible version but instead it will pick a compatible version
Basic steps:
Requirements:
- 1.82.0-nightly (2024-08-05) or newer (before that, the config was different, see fix(config): Adjust MSRV resolve config field name / values #14296, Update cargo rust#128576)
betastable
At minimum, run
$ CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback cargo +nightly -Zmsrv-policy generate-lockfile
Feel free to run any other commands and workflows with
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback
(proposed behavior) orCARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=allow
(existing behavior) with+nightly -Zmsrv-policy
- You could also set them via
.cargo/config.toml
- You could also set them via
workspace.resolver = "3"
orpackage.edition = "2024"
withcargo-features = ["edition2024"]
in yourCargo.toml
See also Documentation
Known issues
- cargo update should not highlight non-semver-compatible "(latest: v0.23.5)" for indirect dependencies #13908
- This doesn't help for dependencies that do not set
package.rust-version
- This does not help if your version requirements are too high (that is actually a use case we intentionally want to support)
cargo add
should be avoiding these version requirements
- For a mixed-MSRV workspace, the lowest MSRV is applied to all workspace members
Changes between call for testing
- Before 2024-08-08
- Before ????
Please leave feedback on this issue