rustup
Install, manage, and update Rust toolchains. Some subcommands, such as `toolchain`, `target`, `update`, etc. have their own usage documentation.
More info →Subcommands (18)
Check for updates to Rust toolchains and `rustup`.
Generate shell completions for `rustup` and `cargo`.
Modify a toolchain's installed components. Without the `--toolchain` option `rustup` will use the default toolchain. See `rustup help toolchain` for more information about toolchains.
Set the default Rust toolchain.
Open the offline Rust documentation for the current toolchain. There are a lot more documentation pages not mentioned here. See `rustup help doc` for more information.
Display help on `rustup` and its subcommands.
This command is an alias of `rustup toolchain install`.
View the man page for a command managed by `rustup`.
Modify directory toolchain overrides. See `rustup help toolchain` for more information about toolchains.
Run a command with an environment configured for a Rust toolchain. Note: All commands managed by `rustup` have a shorthand for this: for example, `cargo +nightly build` is equivalent to `rustup run nightly cargo build`.
Modify the `rustup` installation.
Alter `rustup` settings.
Show installed toolchains, targets, and the version of `rustc`.
Modify a toolchain's supported targets. Without the `--toolchain` option `rustup` will use the default toolchain. See `rustup help toolchain` for more information about toolchains.
Manage Rust toolchains. See `rustup help toolchain` for more information about toolchains.
This command is an alias of `rustup toolchain uninstall`.
Update Rust toolchains and `rustup` itself (if not installed using a package manager).
Display which binary will be run for a command managed by `rustup`. Like `which`, but searches a Rust toolchain instead of `$PATH`.
Examples (7)
Install the nightly toolchain for your system
rustup install nightlySwitch the default toolchain to nightly so that the `cargo` and `rustc` commands will use it
rustup default nightlyUse the nightly toolchain when inside the current project but leave global settings unchanged
rustup override set nightlyUpdate all toolchains
List installed toolchains
Run `cargo build` with a certain toolchain
rustup run toolchain cargo buildOpen the local Rust documentation in the default web browser