Add subcommand: `cargo msrv install-toolchain`
foresterre opened this issue · comments
Martijn Gribnau commented
- Which resolves the MSRV via the usual route, i.e. --rust-version > package.rust-version in Cargo.toml > package.metadata.msrv
- error: if no msrv defined
- Installs the toolchain with rustup
- error: if rustup not installed
- error: unable to install
- ok: already present
- ok: installed toolchain
Convenience command, to be used with github actions workflow.
Use case:
- In a workflow, install rustup without any other components
- Run cargo msrv install-toolchain
- Run whatever command next, e.g. cargo (opt. since only toolchain present: +) test or cargo msrv verify
Possible next steps:
- Add shorthands to test
cargo msrv test [args...]
runscargo +<msrv> test [args...]
- similar: build, check, generate-lockfile ...