Key commands
Essential rustup commands on Windows
# Update Rust to latest stable:
PS> rustup update
# Show installed toolchains:
PS> rustup show
# Install a specific version:
PS> rustup install 1.78.0
# Switch default toolchain:
PS> rustup default stable
# Add a compilation target:
PS> rustup target add x86_64-unknown-linux-musl
# Add a component (e.g. clippy, rustfmt):
PS> rustup component add clippy rustfmt
Toolchains
Manage toolchain channels on Windows
- stable
- The default recommended channel. Released every 6 weeks. Use for production.
- beta
- Next stable release candidate. Updated weekly.
- nightly
- Latest development build. New features first, less stable. Updated daily.
# Install nightly (for features like async traits):
PS> rustup install nightly
PS> rustup default nightly
# Use nightly for just one project:
PS> rustup override set nightly
# (run from inside the project directory)
Windows targets
Rust targets on Windows
| Target | Linker | Use when |
|---|---|---|
x86_64-pc-windows-msvc | MSVC link.exe | Default — native Windows development |
x86_64-pc-windows-gnu | GNU ld (via MSYS2) | No Visual Studio, cross-platform codebase |
i686-pc-windows-msvc | MSVC 32-bit | 32-bit Windows binaries |
aarch64-pc-windows-msvc | MSVC ARM64 | Windows on ARM devices |
FAQ
Rustup questions
How to update Rust on Windows?
Run rustup update in PowerShell. This updates all installed toolchains to their latest patch release. Rust releases a new stable version every 6 weeks. rustup also updates itself automatically.
How to uninstall Rust on Windows?
Run rustup self uninstall. This removes rustup, all toolchains, cargo and their configuration. It does not remove projects you created or packages installed with cargo install into custom locations.
rustup is very slow on Windows — how to speed it up?
rustup downloads from static.rust-lang.org. If downloads are slow, set the RUSTUP_DIST_SERVER environment variable to a closer mirror. The Tuna mirror (China) and other regional mirrors are listed at forge.rust-lang.org/infra/mirrors.html.