RustUP - Bandwhich: http://rustup.top/docs/bandwhich/ - Bat: http://rustup.top/docs/bat/ - Bottom: http://rustup.top/docs/bottom/ - Delta: http://rustup.top/docs/delta/ - Dust: http://rustup.top/docs/dust/ - Exa: http://rustup.top/docs/exa/ - Fd: http://rustup.top/docs/fd/ - Grex: http://rustup.top/docs/grex/ - Hyperfine: http://rustup.top/docs/hyperfine/ - Nushell: http://rustup.top/docs/nushell/ - Procs: http://rustup.top/docs/procs/ - Ripgrep: http://rustup.top/docs/ripgrep/ - Rmesg: http://rustup.top/docs/rmesg/ - Sd: http://rustup.top/docs/sd/ - Tealdeer: http://rustup.top/docs/tealdeer/ - Tokei: http://rustup.top/docs/tokei/ - Zoxide: http://rustup.top/docs/zoxide/ - Tp-Note: http://rustup.top/docs/tp-note/ # Rustup Rustup是系统编程语言**Rust**的安装程序 想要安装 **Rust** 的话,下载并运行[rustup-init.exe](https://win.rustup.rs/x86_64),然后按照提示安装即可。 前提你需要安装[Visual Studio必须文件](/windows-msvc) 如果您使用的是Windows下的Linux子系统,可以使用以下命令来安装Rust。 ```sh curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` ## 安装Rust 安装具体版本的Rust ```sh rustup install 1.30.0 rustup install nightly-2018-08-01 ``` 或者 ```sh rustup install stable rustup install beta rustup install nightly ``` ## 升级Rust ```sh rustup update ``` ## rustup版本管理 设置nightly为默认版本: ```sh rustup toolchain default nightly ``` 使用一个 toolchain 而不是默认的,rustup run: ```sh rustup run nightly cargo build ``` 还有一个更短的别名: ```sh cargo +nightly build ``` 为每个目录设置不同的默认值,在项目中运行: ```sh rustup override set nightly ``` 然后当你在那个目录中时,rustc 或 cargo 的任何调用都将使用该工具链。 要与其他人共享,可以使用工具链的内容创建一个 rust-toolchain 文件,并将其检入源代码管理中。 现在,当有人克隆您的项目时,他们将获得正确的版本,而无需自己“覆盖集合”。