Rust Installation Notes
Getting Started
If you want to start learning Rust with a detailed step-by-step guide, please read the Get Started page.
Managing Toolchain with rustup
Rust is installed and managed by the tool rustup. Rust has a fast version iteration mechanism with a 6-week cycle and supports a large number of platforms, so there are many different Rust build versions at different times. rustup is used to manage Rust build versions on different platforms and make them compatible with each other. It supports installing versions released by the Beta and Nightly channels and other compilation versions used for cross-compilation.
If you have previously installed rustup, you can run rustup update to upgrade Rust.
For more information, please refer to the rustup documentation.
Configuring the PATH Environment Variable
In the Rust development environment, all tools are installed in the ~/.cargo/bin directory, where you can find the Rust toolchain including rustc, cargo, and rustup.
Rust developers usually add this directory to the PATH environment variable. During the installation process, rustup will attempt to configure the PATH. Due to differences between platforms and command line shells, there may be bugs in rustup, so the modifications to PATH may not take effect or may not work at all until the terminal is restarted or the user logs in again.
If you try to execute rustc --version in the terminal after installation fails, the above content is the most likely reason.
Uninstalling Rust
At any time, if you want to uninstall Rust, you can run rustup self uninstall. But we will miss you!