How to install Rust on Win11?

On my new PC I have istalled Win11, MSOffice24 and VSCode.

C:\Users\Guru\Downloads rustup-init.exe
Rust Visual C++ prerequisites

Rust requires a linker and Windows API libraries but they don't seem to be
available. 
[I HAVE INSTALLED SOMETHING (VCRUNTIME140.DLL), SO NOW RUST EXECUTABLES CAN START]

These components can be acquired through a Visual Studio installer.

1) Quick install via the Visual Studio Community installer
   (free for individuals, academic uses, and open source).

2) Manually install the prerequisites
   (for enterprise and advanced users).

3) Don't install the prerequisites
   (if you're targeting the GNU ABI).

>^Q

Select option 1, 2 or 3
>quit

Select option 1, 2 or 3
>cancel

Select option 1, 2 or 3
>^C

Here is a Log from my old PC:

info: syncing channel updates for 'stable-x86_64-pc-windows-msvc' 
info: latest update on 2025-01-09, rust version 1.84.0 (9fc6b4312 2025-01-07) 
info: downloading component 'rust-std' for 'wasm32-unknown-emscripten' 
info: downloading component 'rust-std' for 'wasm32-unknown-unknown' 
info: downloading component 'rust-src' 
info: downloading component 'cargo' 
info: downloading component 'clippy' 
info: downloading component 'rust-docs' 
info: downloading component 'rust-std' 
info: downloading component 'rustc' 
info: downloading component 'rustfmt' 
info: removing previous version of component 'rust-std' for 'wasm32-unknown-emscripten' 
info: removing previous version of component 'rust-std' for 'wasm32-unknown-unknown' 
info: removing previous version of component 'rust-src' 
info: removing previous version of component 'cargo' 
info: removing previous version of component 'clippy' 
info: removing previous version of component 'rust-docs' 
info: removing previous version of component 'rust-std' 
info: removing previous version of component 'rustc' 
info: removing previous version of component 'rustfmt' 
info: installing component 'rust-std' for 'wasm32-unknown-emscripten' 
info: installing component 'rust-std' for 'wasm32-unknown-unknown' 
info: installing component 'rust-src' 
info: installing component 'cargo' 
info: installing component 'clippy' 
info: installing component 'rust-docs' 
info: installing component 'rust-std' 
info: installing component 'rustc' 
info: installing component 'rustfmt' 
info: checking for self-update

Have I to install MS Visual Studio in case of choosing the 1) ithem ?
So, how to install Rust ?

If you’re interested in more information/context, feel free to check out these pages from the rustup documentation/book:

Windows - The rustup book

MSVC prerequisites - The rustup book

1 Like

Nothing has technically changed, those are the same options they've offered to you on first install for a long time.

You're probably in practice not particularly likely to be pulled up by Microsoft for using the free version of it's build tools in an organization but better to be safe. You're probably fine with the GNU build tools if you have any question.

1 Like

[quote="simonbuchan, post:3, topic:126460"]
You're probably fine with the GNU build tools
[/quote] No.. :smile: I do not understand what is GNU and what MVC.. First time I have installed easily (without any choosing )..

It's offered this choice in the form of these options on first install for at least 7 years (about when I started)? It's a bit more verbose now so you know what you're actually getting into with the choice.

What the options are actually offering you are:

  1. msvc but automatic install - you might have legal issues if you're working for a company
  2. msvc but manually installed - required to use the paid versions of msvc you need for a company
  3. gnu

It's always safe to pick 3, it's technically slightly better to pick 1 or 2, it's easier to pick 1 or 3.

So if you don't know and therefore care which toolchain you want already, pick the first if, as it says, you are one of "individuals, academic uses, and open source", if you have a paid visual studio license pick 2, otherwise pick 3.

1 Like