Would it be possible to have a nightly build Rust compiler for convenience (faster build cycle, auto-update) and a dev version of Rust cloned from GitHub for experimentation
Usually when dealing with rustup
, you're dealing with toolchains–a single installation of the Rust compiler. There are 3 major release channels:
The channel can be appended with optional date and host names: channel[-date][-host]
.
You can install multiple toolchains using rustup
:
rustup toolchain install nightly
rustup toolchain install stable-x86_64-pc-windows-msvc
Be careful when nightly is installed as any updates using rustup update
will also update stable.
You can have different level of overrides:
# command level
rustc +beta
cargo +beta
# environment level
export RUSTUP_TOOLCHAIN=nightly-2019-05-22
# directory level
rustup override set stable
The toolchain configuration can also be version controlled using a rust-toolchain
file, which contains just the toolchain name.
$ cat rust-toolchain
nightly-2019-05-22
No host name can be configured in the rust-toolchain
file.
The override precedence is:
cargo +beta
RUSTUP_TOOLCHAIN
environment variablerustup override set beta
rust-toolchain
fileReference: https://github.com/rust-lang/rustup.rs#toolchain-specification