Crate cargo_toolchain

Source
Expand description

§cargo-toolchain

cargo-toolchain is a utility to get the currently active and default rustup toolchains.

It requires that rustup is installed.

§Usage as a CLI

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

Functions§

get_active_toolchain
Get the profile that was used to call the current executable.
get_directory_toolchain
Get the default rustup toolchain for the current directory.
get_toolchain
Wrapper around get_active_toolchain and get_directory_toolchain
truncate_toolchain
Truncate the triple from a toolchain name if it’s one of the defaults.