foresterre / cargo-msrv

🦀 Find the minimum supported Rust version (MSRV) for your project

Home Page:https://foresterre.github.io/cargo-msrv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add subcommand: `cargo msrv install-toolchain`

foresterre opened this issue · comments

  • 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...] runs cargo +<msrv> test [args...]
  • similar: build, check, generate-lockfile ...