Rustup
Recipe | Crates | Categories |
---|---|---|
Install and Manage Rust Toolchains with rustup |
Install and Manage Rust Toolchains with rustup
rustup
⮳ is a toolchain multiplexer. It installs, manages, and upgrades versions of the rust compiler rustc
⮳, the Rust package manager cargo
⮳, the Rust linter clippy
⮳, the Rust code formatter rustfmt
⮳, etc.
More precisely, rustup
⮳ can install and manage multiple Rust toolchains and presents them all through a single set of tools installed to ~/.cargo/bin
. The rustc
⮳ and cargo
⮳ executables installed e.g. in ~/.cargo/bin
are proxies that delegate to the real toolchain.
rustup
⮳ is similar to Python's pyenv
⮳ or Node's nvm
⮳.
Key rustup
commands⮳ include the following:
# Rustup's help
rustup help
# Show the help page for a Subcommand (like `toolchain`)
rustup toolchain help
# Show which toolchain will be used in the current directory
rustup show
# Update to a new Version of Rust
rustup update
# Show which toolchain will be used in the current directory
rustup target list
# Overview of what is installed on your system
rustup toolchain list
# See a list of available and installed components.
rustup component list
Rustup also offers convenience commands:
# Open the local documentation in your browser
rustup doc
# May require `rustup component add rust-docs`