tldr/pages/common/rustup.md

34 lines
733 B
Markdown
Raw Normal View History

2017-11-27 14:58:49 +00:00
# rustup
> Rust toolchain installer.
> Install, manage, and update Rust toolchains.
> More information: <https://github.com/rust-lang/rustup.rs>.
2017-11-27 14:58:49 +00:00
- Install the nightly toolchain for your system:
`rustup install nightly`
2017-11-30 14:51:01 +00:00
- Switch the default toolchain to nightly so that the `cargo` and `rustc` commands will use it:
2017-11-27 14:58:49 +00:00
`rustup default nightly`
2018-02-18 18:35:09 +00:00
- Use the nightly toolchain when inside the current project, but leave global settings unchanged:
`rustup override set nightly`
2017-11-27 14:58:49 +00:00
- Update all toolchains:
`rustup update`
- List installed toolchains:
`rustup show`
- Run cargo build with a certain toolchain:
`rustup run {{toolchain_name}} cargo build`
2021-07-29 14:09:05 +01:00
- Open the local rust documentation in the default web browser:
`rustup doc`