Go to the Rust official website, where you can set the language in the top-right corner.
Click "Get Started" and you will see the following interface:
Choose the appropriate version based on your operating system: 32-BIT for 32-bit systems and 64-BIT for 64-bit systems. Most computers today are 64-bit. If you are unsure, as long as your computer isn’t very old, downloading the 64-bit version should work fine.
To download Rust for MacOS, Linux, or the Windows Linux Subsystem, execute the following command in your terminal:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Open the downloaded installer, and you will see the following interface:
There are three options:
For most users, Option 1 is sufficient (either type 1 and press Enter, or just press Enter).
If you see the following screen, Rust has been successfully installed:
The installer will prompt you to restart your shell. Press Enter to exit the program. At this point, Rust installation is complete.
Rust commands can be executed in the terminal in Windows (Win11 includes it by default; if not, search for Windows Terminal in the Microsoft Store to download).
The result format: rustc x.y.z (xxxxxxxxx yyyy-mm-dd):
• Open Local Rust Documentation Manual: rustup doc
The above is the detailed content of [Rust Self-Study] . Install Rust. For more information, please follow other related articles on the PHP Chinese website!