Rust custom installation path

1. Download the installation package

下载地址:Install Rust - Rust Programming LanguageA language empowering everyone to build reliable and efficient software.https://www.rust-lang.org/tools/install

 After running, we found that it will be installed on the C drive by default. 

2. Create two folders in the directory to be installed, named .cargo and .rustup

3. Configure environment variables

Right click on this computer->Properties->Advanced System Settings->Environment Variables

Edit the " Path " variable and add " %RUSTUP_HOME% " and " %CARGO_HOME% "

 

4. Start installing Rust

At this time, when we re-run the Rust installer, we will find that the default path has become our custom path

Next type "1" and press Enter to start the default installation

To check if you have Rust and Cargo installed , you can run in a terminal:

cargo --version

Successful installation

Guess you like

Origin blog.csdn.net/love906897406/article/details/126048624