What you need to know before installing
- rustup
- The official Rust toolchain installer and version manager. It installs rustc, cargo, and manages multiple toolchain versions.
- rustc
- The Rust compiler. Installed automatically by rustup — you rarely invoke it directly.
- cargo
- Rust's build system and package manager. You use cargo to build, test, run and manage dependencies.
- MSVC
- Microsoft Visual C++ linker — required on Windows. rustup installs Visual Studio Build Tools automatically when you choose the default target.
- x86_64-pc-windows-msvc
- The default and recommended Rust target on Windows. Produces native Windows binaries using the MSVC linker.
- windows-rs
- The official Microsoft crate for calling Win32 and WinRT APIs from Rust code.
Install Rust on Windows in 3 steps
- 1
Download and run rustup-init.exe
Click the download button above. Run the installer — accept the default options. rustup installs the MSVC build tools automatically if they are not present.
- 2
Verify the installation
PS> rustc --versionrustc 1.79.0 (129f3b996 2024-06-10)PS> cargo --versioncargo 1.79.0 (ffa9cf99a 2024-06-03) - 3
Create your first project
PS> cargo new hello-winPS> cd hello-winPS> cargo runCompiling hello-win v0.1.0Finished dev profileHello, world!
Rust on Windows — complete guide index
| Guide | What it covers |
|---|---|
| Full install guide | MSVC toolchain, rustup, PATH, verification |
| Rustup guide | Manage toolchains, targets, components |
| Download options | rustup-init.exe, offline, standalone |
| Windows 11 | Windows 11 specific setup and fixes |
| MSVC toolchain | Visual Studio Build Tools setup |
| Quickstart | First native Windows app |
| Cargo on Windows | Build, deps, workspaces |
| GUI development | WinUI, egui, iced, Slint |
| Win32 & WinRT | windows-rs, windows-sys |
| Package & sign | MSI, MSIX, code signing |
| Cross-compile | Linux/macOS targets from Windows |
| WSL vs native | Which to choose |
| Performance | Release builds, PGO, LTO |
| Troubleshooting | Build and linker errors |
| Not compiling | Compiler error fixes |
| Linker errors | LNK2019, link.exe fixes |
| Rust vs C++ | Language comparison |
| Rust vs Go | Language comparison |
| FAQ | Common questions answered |
Common questions
What is the fastest way to install Rust on Windows?
Download rustup-init.exe and run it. Accept the default options. rustup installs the Rust compiler, cargo, and the MSVC build tools automatically. The whole process takes about 5 minutes.
Verify with rustc --version in a new PowerShell window after install.
Do I need Visual Studio to use Rust on Windows?
You need the Visual Studio Build Tools (not the full Visual Studio IDE). rustup installs them automatically when you choose the default MSVC target. The Build Tools include the MSVC linker which Rust requires on Windows. See the MSVC toolchain guide.
What is the difference between rustup, rustc and cargo?
rustup is the toolchain manager — it installs and updates Rust. rustc is the Rust compiler — it turns .rs files into binaries. cargo is the build system and package manager — it manages your project, dependencies and build process. You use cargo for almost everything; rustup for toolchain management.