Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Step 1: Install the MSVC C++ Build Tools
Rust on Windows requires Microsoft's C++ build tools as a prerequisite. If you already have Visual Studio installed with the Desktop development with C++ workload, you can skip this step.
Otherwise, install the Microsoft C++ Build Tools and select the Desktop development with C++ workload.
Note
Use of the Microsoft C++ Build Tools requires a valid Visual Studio license (Community, Pro, or Enterprise). The Community edition is free for students, open-source contributors, and individuals.
Step 2: Install Rust
The official Rust installer, rustup, handles everything — the compiler, Cargo, and future updates.
After installation, open a new terminal and verify your setup:
cargo --version
rustc --version
Tip
To keep Rust up to date, run rustup update periodically.
Step 3: Install Visual Studio Code and the Rust extension
- Download and install Visual Studio Code.
- Install the rust-analyzer extension from the VS Code Marketplace. This adds code completion, inline errors, go-to-definition, and debugging support.
Next steps
- Rust for Windows, and the windows crate — call Windows APIs directly from Rust
- Rust in Visual Studio Code — detailed VS Code Rust workflow
- The Rust Programming Language book — the official free Rust book
Windows developer