Home > Backend Development > C++ > [Rust Self-Study] . Install Rust

[Rust Self-Study] . Install Rust

Mary-Kate Olsen
Release: 2025-01-01 03:51:09
Original
771 people have browsed it

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.

[Rust Self-Study] . Install Rust

Click "Get Started" and you will see the following interface:

[Rust Self-Study] . Install Rust

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
Copy after login

Open the downloaded installer, and you will see the following interface:

[Rust Self-Study] . Install Rust

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:

[Rust Self-Study] . Install Rust

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

[Rust Self-Study] . Install Rust

Open Local Rust Documentation Manual: rustup doc

Development Tools

  • Install the Rust plugin for VS Code
  • VIM
  • Helix
  • RustRover

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template