Install Rust on Windows 11

Pick the rustup-init option

On Windows 11 the recommended path is the rustup-init installer with the MSVC toolchain.

That choice matches the native Windows build tools and gives the smoothest experience for beginners. You need the MSVC build tools installed first so the linker is available for compiled programs.

When the installer asks about toolchains, accept the default MSVC option unless you have a clear reason to pick the GNU variant.

Run rustup-init

Run the rustup-init program and accept the defaults for a standard install.

The setup adds rustup for toolchain management, rustc for compiling, and cargo for projects. Let it finish completely before you open a new terminal window.

If Windows Defender SmartScreen shows a prompt, confirm that you trust the installer and continue with the default answers.

rustc --version and cargo --version

Open a fresh terminal window and ask both tools for their versions.

rustc --version

rustc 1.75.0 (ad2397f6f 2023-12-28) (x86_64-pc-windows-msvc)

cargo --version

cargo 1.75.0 (4d4553a9 2023-11-14)

Matching version numbers mean the toolchain is installed and ready for the first project.

PATH notes

The installer updates the user PATH so rustc, cargo, and rustup are found in every new terminal.

If a command is not found, restart the terminal or sign out and back in so Windows reloads the PATH. After the reload, run the version commands again from the previous section.

The code on this page was not run: it needs Windows 11.

Article author: Arthur Isaev