Install

Install Rust

Get the full Rust toolchain in a single command. The rustup installer manages the compiler, Cargo, and the standard library, and keeps everything up to date.

Using rustup (Recommended)

Install with rustup

rustup is the recommended way to install Rust. It installs the stable toolchain and gives you a single command to switch versions, update, and uninstall.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

After installing, add the toolchain to your current shell with source "$HOME/.cargo/env", or simply open a new terminal.

Pick your platform

Install on any platform

The same rustup toolchain works everywhere. Choose the instructions that match your operating system.

Linux and macOS

Run the installer in your terminal. It downloads rustup and sets up the stable toolchain for your user account.

# Linux or macOS
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Windows

Download and run rustup-init.exe, or install it with the Windows Package Manager.

# PowerShell / winget
winget install Rustlang.Rustup

# Or download the installer:
# https://win.rustup.rs/x86_64

Alternative installs

Prefer a package manager or a container? Use your distro's package or the official Rust image.

# Docker
docker run --rm -it rust

# Homebrew (macOS/Linux)
brew install rustup-init
Verify installation

Confirm everything works

Open a new terminal and ask the compiler and package manager for their versions. If you see version numbers, the install succeeded.

$ rustc --version
$ cargo --version

Expected output

The exact version may differ, but the format should look like this:

rustc 1.98.1 (f1f5f6098 2026-01-15)
cargo 1.98.1 (f2f5f6098 2026-01-15)

Want to write your first program now? Head to Learn Rust.

Maintenance

Updating and uninstalling

Because rustup manages the toolchain for you, keeping Rust current takes a single command. Run it whenever you want the latest stable release.

# Update to the latest stable release
rustup update

# Remove the Rust toolchain and rustup
rustup self uninstall

You can also install additional toolchains, such as nightly or a pinned version, with rustup toolchain install and switch between them using rustup default.

Next steps

You are ready to build

With Rust installed, explore the toolchain or start learning the language.

Learn Rust

Read The Rust Programming Language, work through Rustlings, and write your first program.

Explore the tools

Discover Cargo, rustfmt, Clippy, and rustdoc, and see how they fit into your workflow.

Get help!

Stuck? The community has you covered

Ask on the users forum, chat with the community, or search the documentation. Thousands of Rustaceans are happy to help.