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"

    f4kWi6.jpg

  • 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.
    f4VSVs.jpg
  • The installation is complete
    Use rustc -V to detect
    f4ZW0H.jpg
  • Modify environment variables

    CARGO_HOME=D:\Program\rust\.cargo
    RUSTUP_HOME=D:\Program\rust\.rustup
    PATH=%CARGO_HOME%\bin

Tag:none

Add a new comment.