Skip to main content

Installation

Rust Toolchain Overview​

Before installing, it’s important to understand three key tools:

rustc​

  • The Rust compiler
  • Converts Rust code into executable programs

cargo​

  • Rust’s package manager and build system
  • Handles:
    • Creating projects
    • Managing dependencies
    • Building and running code
    • Testing

rustup​

  • The installer and version manager
  • Installs and updates:
    • rustc
    • cargo
    • Standard libraries
  • Allows switching between Rust versions

You only need to install rustup. It automatically installs rustc and cargo.

Installing Rust Using rustup​

Windows​

  1. Go to: https://www.rust-lang.org
  2. Click Install
  3. Download and run rustup-init.exe
  4. When prompted:
1) Proceed with installation (default)

Press Enter

Windows users may need Microsoft C++ Build Tools. rustup will tell you if they are missing.

Verify Installation​

After installation, restart your terminal and check:

rustc --version
cargo --version
rustup --version

Example output:

rustc 1.75.0 (82e1608df 2024-01-02)
cargo 1.75.0 (1d8b05cdd 2024-01-01)
rustup 1.26.0

This confirms Rust is installed correctly.

How rustup Works (Important Concept)​

Check installed toolchains

rustup toolchain list

Update Rust

rustup update

Set default toolchain

rustup default stable

Rust has:

  • stable → recommended for beginners
  • beta
  • nightly