cargo-msrv
cargo-msrv copied to clipboard
Find the MSRV based on the known rust-version in the dependency tree
- [x] Find dependencies (e.g. cargo metadata or cargo guppy via cargo metadata)
- [x] For each dependency:
- [ ] read
package.rust-version
or elsepackage.metadata.msrv
- [ ] read
- [ ] select min(dependency min versions)
cargo msrv list
Lists the msrv's of all (transitive) dependencies, and computes the MSRV based on these values
--include-dev
--no-transitive
--no-compute-msrv
Both 1.56 and 1.57-beta currently do not have the "rust_version" field in the cargo metadata. It does however exist in nightly Cargo.
My suggestion would be to currently simply work-around this problem, and use cargo metadata (or guppy :D) to get the manifest, and then parse the field ourselves. For cargo versions >= versions which do include the field, we can then rely on cargo metadata, and at that time use this first solution as a fallback.
https://docs.rs/guppy/0.11.2/guppy/graph/struct.PackageMetadata.html#method.manifest_path
cargo msrv list
now can do most of this, although it would be nice to also have a more general table with | crate name | version | is in(direct) | MSRV |