rustup
Install, manage, and update Rust toolchains. Some subcommands, such astoolchain
,target
,update
, etc. have their own usage documentation. More information: https://rust-lang.github.io/rustup.
-
Install the nightly toolchain for your system:
rustup install nightly
-
Switch the default toolchain to nightly so that the
cargo
andrustc
commands will use it:
rustup default nightly
-
Use the nightly toolchain when inside the current project but leave global settings unchanged:
rustup override set nightly
-
Update all toolchains:
rustup update
-
List installed toolchains:
rustup show
-
Run
cargo build
with a certain toolchain:
rustup run {{toolchain}} cargo build
-
Open the local Rust documentation in the default web browser:
rustup doc
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.