cargo-toolchain is a utility to get the currently active and default
It requires that rustup is installed.
cargo install cargo-toolchain cargo toolchain # prints the currently active cargo toolchain, e.g. 'stable' cargo toolchain -d # prints the default toolchain for the directory cargo toolchain -h # print help message
Get the profile that was used to call the current executable.
Get the default rustup toolchain for the current directory.
Truncate the triple from a toolchain name if it's one of the defaults.