rustup
Manage Rust toolchains and versions
TLDR
Install the nightly toolchain for your system
Switch the default toolchain to nightly so that the cargo and rustc commands will use it
Use the nightly toolchain when inside the current project but leave global settings unchanged
Update all toolchains
List installed toolchains
Run cargo build with a certain toolchain
Open the local Rust documentation in the default web browser
SYNOPSIS
rustup [OPTIONS] [SUBCOMMAND]
PARAMETERS
-V, --version
Show rustup version.
-h, --help
Show help message.
--verbose
Enable verbose output.
--quiet
Disable progress output.
--no-self-update
Disable automatic updates.
default
Set the default toolchain to use.
override
Override the toolchain for a specific directory.
update
Update the current toolchain.
show
Show the currently active toolchain.
target add
Add a new target platform for cross compilation.
component add
Add a new component.
DESCRIPTION
Rustup is a command-line tool that simplifies the installation, updating, and management of the Rust programming language and its associated tools. It allows users to easily switch between different Rust toolchains (stable, beta, nightly), add and remove components like rustfmt and clippy, and manage multiple Rust versions without conflicting with each other.
Rustup is essential for developers who want to stay up-to-date with the latest Rust features, test code across multiple Rust versions, or contribute to the Rust ecosystem. It provides a consistent and reliable way to handle the complexities of Rust toolchain management, making it easier for developers to focus on writing code rather than managing their development environment.
CAVEATS
Requires internet access for initial installation and updates. Changes to the PATH environment variable are persistent and may require a shell restart. Can sometimes experience issues with certain firewalls or proxy configurations during download and installation.
TOOLCHAINS
Rustup supports various toolchains, including stable, beta, and nightly versions. Each toolchain represents a different stage of Rust development, allowing users to experiment with new features or maintain compatibility with older versions.
Stable is recommended for production, Beta for early testing and Nightly to test the very latest features.
HISTORY
Rustup was created to address the challenges of managing multiple Rust versions and components. It was initially developed as a standalone tool and has become the standard way to install and manage Rust installations. It provides a robust system and is the core of rust installations on all platforms.