Rustup installation tutorial
Download Rustup
Download address: https://www.rust-lang.org/zh-CN/tools/install
(You can also choose other versions https://forge.rust-lang.org/infra/other-installation-methods.htm
Download acceleration
Open Powershell input$ENV:RUSTUP_DIST_SERVER="https://mirrors.ustc.edu.cn/rust-static" $ENV:RUSTUP_UPDATE_ROOT="https://mirrors.ustc.edu.cn/rust-static/rustup"
- Run rustup-init.exe
Just press Enter and install by default (using MS by default requires Visual Studio 2013 or above environment)
If using MinGW + GCC compilation environment
Need to customize the Default host triple after installation? It is x86_64-pc-windows-gnu and the rest are default.
After setting is complete, press Enter to install. - The installation is complete
Userustc -V
to detect Modify environment variables
CARGO_HOME=D:\Program\rust\.cargo RUSTUP_HOME=D:\Program\rust\.rustup PATH=%CARGO_HOME%\bin