- 1 year ago
How to install Rust via CLI on Windows?
To install Rust via the command-line interface (CLI) on Windows, you can use the official Rust installer called "rustup." Here's a step-by-step guide:
Open a command prompt: Launch the Command Prompt or PowerShell on your Windows system.
Download and install
rustup
: In the command prompt, run the following command to download and execute therustup-init.exe
installer:
bashcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
If you don't have curl
installed, you can manually download rustup-init.exe
from the official Rust website (https://www.rust-lang.org/tools/install) and execute it.
Proceed with the default installation: The installer will prompt you to proceed with the default installation. Press Enter to continue.
Accept the license: The installer will display the Rust license. Type "yes" and press Enter to accept the license and continue with the installation.
Choose the default installation options: The installer will prompt you to choose the default installation options. Press Enter to proceed with the default options, which include the default toolchain and default component set.
Wait for the installation to complete:
rustup
will download and install the Rust toolchain and its associated components. This process may take a few minutes depending on your internet connection speed.Add Rust to the system's PATH: After the installation is complete,
rustup
will automatically add Rust to the system's PATH environment variable.Verify the installation: To verify that Rust is installed correctly, open a new command prompt and run the following command:
bashrustc --version
If Rust is installed properly, it will display the installed version of Rust.
That's it! You have successfully installed Rust on your Windows system using the CLI. You can now start using Rust to develop applications or libraries.