1.1.1. Installing Rust from the Official Website
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:
- Option 1 (Default): Standard installation
- Option 2: Custom installation, allowing you to customize the installation path, components, toolchain version, etc.
- Option 3: Cancel installation
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.
1.1.2. Command Line Operations for Rust
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).
- Update Rust: rustup update Rust is a rapidly evolving language, so it’s recommended to perform this operation periodically to get the latest version.
- Uninstall Rust: rustup self uninstall
- Verify Installation: rustc --version or rustc -V
The result format: rustc x.y.z (xxxxxxxxx yyyy-mm-dd):
- x.y.z: Version number
- xxxxxxxxx: Current version’s hash value
- yyyy-mm-dd: Submission date of the current version
• Open Local Rust Documentation Manual: rustup doc
Development Tools
- Install the Rust plugin for VS Code
- VIM
- Helix
- RustRover
- …
Top comments (0)