Cargo Workspace
When developing a Rust project with cargo, you may use a cargo workspace to manage a set of related packages together.
cargo-msrv currently partially supports cargo workspaces although full support is on the way.
Finding the MSRV of a workspace member
To find the MSRV of a workspace crate, you can run:
cargo msrv find -- cargo check -p $crate_name
To verify the MSRV of a workspace, you can run:
cargo msrv verify -- cargo check -p $crate_name
Workspace support in cargo-msrv
cargo-msrv should support the follow for a cargo workspace:
- Run
cargo msrv findon a workspace, and find the MSRV of all, or the selected workspace packages - Run
cargo msrv find --write-msrvto write the found MSRV's of the selected workspace packages - Run
cargo msrv verifyon a workspace, and verify the MSRV of all, or the selected workspace packages - Run
cargo msrv set --package <x>to set the MSRV of a specific package in the workspace - Run
cargo msrv showon a workspace, and present the MSRV of all, or the selected workspace packages, to the user - Add
cargo msrv --workspace,cargo msrv --package <x>,cargo msrv --exclude <x>flags to select workspace packages cargo msrv find,cargo msrv verifyand others should supportworkspace.packageinheritance, for example for:- the
rust-versionfield, used bycargo msrv verifyto detect the MSRV to verify - the
editionfield, used bycargo msrv findto restrict the search space - the
includeandexcludefields to define the workspace members
- the
The following features are under consideration:
- Run
cargo msrv set --workspace <value>on a workspace to set a common MSRV - Run
cargo msrv set --workspace-package <x>to set the MSRV to the workspace.package table, if in a workspace- TODO: determine the name of the flag
- Run
cargo msrv liston a workspace to list the MSRV of dependencies of each of the workspace crates.
Please open an issue if your use case is not described in the above list.
Follow progress on GitHub
Tracking issue: #1026
cargo msrv find & cargo msrv verify
cargo msrv list
- No dedicated issue yet
cargo msrv set
- No dedicated issue yet
cargo msrv show