Installation
The recommended way to install Rust is to using rustup. If you're using macOS, Linux, or another Unix-like OS, you can run the following command in the terminal:
shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shOn Windows, navigate to this link and follow the instructions for installing Rust.
To confirm that Rust is installed correctly, use the following command:
shell
rustc --versionAlternate Installation Methods
If, for some reason, you don't wish to use rustup, you can explore the 'Other Rust Installation Methods' page at this link.
rustup
Rust is installed and managed by the rustup tool. Here are some useful commands you’ll often need:
- Update Rust to the latest version:
shell
rustup update- Uninstall Rust and
rustup:
shell
rustup self uninstall- Open the local Rust documentation (offline):
shell
rustup doc- Open the Rust Programming Language book (offline):
shell
rustup doc --book