RUSTPRINT

Search RustPrint by question, error, syntax, or task.

← Start with Rust

START 04 // LOCAL TOOLCHAIN

Install Rust without guessing

For most people, installing Rust means installing rustup. rustup then manages the Rust compiler and the standard toolchain on your machine.

You are not installing one mysterious “Rust app”.rustup manages the toolchain, rustc is the compiler, andcargo manages normal Rust projects.

The three names you will immediately meet

rustup

Installs and manages Rust toolchains, release channels, and additional targets.

rustc

The Rust compiler. It checks Rust source code and compiles valid programs.

cargo

The everyday project tool: create, build, run, test, and manage dependencies.

rustfmt / clippy

Common companion tools for formatting code and catching suspicious or unidiomatic patterns.

Windows

The official Rust installer page provides rustup-init.exe for Windows. Run the installer and follow its prompts. Rust on Windows can also require Microsoft's C++ build tools because linking native programs needs the platform toolchain.

Using WSL instead?

WSL behaves like a Unix environment for installation purposes. Follow the Linux/Unix rustup path inside the WSL terminal rather than the native Windows installer.

macOS, Linux, and Unix-like environments

The official installation method uses a shell command that downloads and starts rustup:

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

Read the prompts before accepting them. On some systems you may also need a C compiler/linker toolchain if it is not already installed.

How do you know the install actually worked?

Open a fresh terminal and ask each important tool for its version:

VERIFY THE TOOLCHAIN
rustc --version
cargo --version
rustup --version

Version numbers mean the commands are on your PATH and available to the shell. If the install succeeded but the command is still “not found”, the official installer notes that restarting the terminal may be necessary for the PATH change to take effect.

YOU DO NOT NEED TO MEMORIZE ANY OF THIS

In normal day-to-day beginner work you will mostly type Cargo commands. rustup becomes important when you update Rust, switch toolchains, or add a compilation target. rustc is always there underneath, but Cargo usually drives it for a project.

Updating later

The rustup-managed toolchain can be updated with:

UPDATE RUST
rustup update
PRIMARY SOURCES

Use the official installer for the current instructions