Install guide

Install Rust on Windows — MSVC toolchain setup guide 2026

To install Rust on Windows, download rustup-init.exe from rustup.rs and run it. Choose option 1 (default install) to get the x86_64-pc-windows-msvc toolchain. Visual Studio Build Tools 2022 install automatically if not present.

Prerequisites

OS
Windows 10 or Windows 11, 64-bit
Disk space
At least 2 GB free (Rust + MSVC tools)
Internet
Required during install — rustup downloads toolchain components
Privileges
Standard user account works; no administrator rights needed

Install Rust on Windows — step by step

  • 1

    Download rustup-init.exe

    Get the installer from the download page or directly from win.rustup.rs. The file is about 8 MB.

  • 2

    Run and choose option 1

    cmd.exe
    C:\> rustup-init.exe
    Welcome to Rust!
    Current installation options:
    default host triple: x86_64-pc-windows-msvc
    default toolchain: stable
    1) Proceed with standard installation (default)
    2) Customize the installation
    3) Cancel installation
    > Press 1 then Enter
  • 3

    Wait for MSVC Build Tools

    If Visual Studio Build Tools are not installed, rustup triggers their installer automatically. This downloads about 1.5 GB and takes 5–15 minutes. Do not close the window.

  • 4

    Open a new terminal and verify

    PowerShell — new window
    PS> rustc --version
    rustc 1.79.0 (129f3b996 2024-06-10)
    PS> cargo --version
    cargo 1.79.0 (ffa9cf99a 2024-06-03)
    PS> rustup show
    Default host: x86_64-pc-windows-msvc
    stable-x86_64-pc-windows-msvc (default)

Rust PATH on Windows

rustup adds Rust to your PATH automatically. Binaries are installed to:

Default locations
# Cargo binaries (cargo, rustc, rustup):
%USERPROFILE%\.cargo\bin
# Toolchain files:
%USERPROFILE%\.rustup\toolchains\
Open a new PowerShell or cmd window after install. The PATH change only affects new terminals, not ones already open.

Fix install errors

"error: linker link.exe not found"
MSVC Build Tools not installed or not on PATH
Re-run rustup-init.exe or install Visual Studio Build Tools manually
rustup-init.exe blocked by Windows Defender
SmartScreen flags unknown publisher
Click More info > Run anyway. The installer is signed by Mozilla.
"rustc" is not recognized after install
PATH not updated in current terminal
Open a new PowerShell window — PATH changes require a new session

Install questions

How to install Rust on Windows without admin rights?

rustup installs per-user by default into %USERPROFILE%\.cargo and %USERPROFILE%\.rustup. No administrator rights are required for the Rust toolchain itself. The MSVC Build Tools installer, however, may require admin rights. If you cannot install Build Tools, use the GNU toolchain: during rustup setup choose option 2 (customize) and select x86_64-pc-windows-gnu instead.

How long does Rust installation take on Windows?

The rustup installer itself takes under a minute. If MSVC Build Tools are not installed, their installer downloads about 1.5 GB and takes 5–15 minutes depending on your internet speed. On subsequent installs or when Build Tools are already present, Rust installs in 1–2 minutes.

Can I install Rust on Windows without Visual Studio?

Yes, using the GNU toolchain. During rustup setup, choose Customize and select x86_64-pc-windows-gnu as the target. This requires installing MSYS2 and the mingw-w64-x86_64-gcc package. The MSVC toolchain is recommended for native Windows development and Windows API access.