cargo-msrv
Find and manage the minimum supported Rust version
TLDR
Find minimum supported Rust version
SYNOPSIS
cargo msrv [options] command
DESCRIPTION
cargo msrv finds and manages the Minimum Supported Rust Version (MSRV) for Rust projects. It determines the oldest Rust compiler version that can successfully build a crate by testing against available toolchains. By default it uses binary search to efficiently narrow down the compatible version range.
Maintaining an accurate MSRV is important for library authors who want to support users on older Rust versions. The tool can automatically set the `rust-version` field in Cargo.toml after finding the minimum version, and verify that the declared MSRV remains valid as the codebase evolves.
PARAMETERS
--path dir
Project directory path--linear
Use linear search instead of binary--min version
Minimum version to consider--max version
Maximum version to consider--target triple
Target platform--manifest-path path
Path to Cargo.toml
COMMANDS
find
Discover the MSRV by testing versionsverify
Check if project works with declared MSRVshow
Display MSRV from Cargo.tomlset version
Update rust-version in Cargo.tomllist
Show MSRVs of dependencies
REQUIREMENTS
Requires rustup for toolchain management.
CAVEATS
Binary search is much faster than linear (79+ minor versions exist). Set MSRV via package.rust-version field in Cargo.toml.
