How to Install rust and MinGW64 on Windows 10

Hello everyone,

I am new to rust-lang and sparingly knowledgeable in Programming, but desiring to be a proficient and professional Rust Programmer.

Right now, am having challenges installing Rust because I don't know what step to take after downloading the rustup-init.exe and Visual Studio Build Tools, which I tried installing them in tandem. I had to opt for MinGW64 when I saw the large size of file of the required Visual Studio Build Tools that needs be downloaded.

My own rustup-init.exe command prompt instruction screen is different from what I am seeing online of: "How to Install Rust on Windows OS (Windows 10 precisely)" Beside number one instruction, I don't know what number to go with since I have opted to go with MinGW64, either 2 or 3 as depicted in the screenshot alongside this post.

So, with the screenshots attached with this post my questions are:

  1. Having installed MinGW64 together with all the necessary files through MSYS2 (pacman), what number should I select to install Rust using rustup-init.exe looking at my own Command Prompt RustUp installation screen as shown in the screenshot?

  2. Development and Production wise, is there any limitation using MinGW64 on Windows as compared to using Visual Studio Build Tools? Going through the forum for relevant information, I saw a post about not being able to use "rustc" in Actix with MinGW64. So is there any downside or challenge using MinGW64 on Windows OS?

  3. With MinGW64 on Windows can one cross compile to other platforms (Linux and MacOS)? Any downside? As Visual Studio Build Tools advertised of Cross Compilation to other platforms.

  4. If need be for me in the nearest future, can I use both MingGW64 and Visual Studio Build Tools side by side on my Windows OS? Any downside aside disk space consumption?

  5. Looking at the Installation screenshot of Visual Studio Build Tools and running a Windows 10 OS, which of the SDKs should I thick if I am to install Visual Studio Build Tools; both Windows 10 & 11 SDK or just one of them: 10 or 11?

  6. Going by this challenge this developer had in: Windows Rust compiler not using mingw as linker and looking at the Visual Studio Build Tools Screenshot what are they commenters implying developer install?

Below are the screenshots:

rustup-init_exe installation command prompt Screenshot below:


you can select 3 since mingw uses gnu abi. actually, if you only ever need to build pure rust code, you don't need mingw, rust toolchain of -gnu abi comes with a linker and necessary crt startup code. just do one of the following:

rustup default stable-gnu # or the full toolchain triplet: stable-x86_64-pc-windows-gnu
rustup default nightly-gnu

it depends. typically, pure rust code shouldn't care the toolchain, but if your code (or your dependency crates) uses FFI to interop with non-rust code, you might encounter problems if the native library can only build succesully using msvc.

yes, your host toolchain doesn't affect the cross compile targets.

yes, rustup manages toolchain for you. you can install as many toolchains as you like, you can only set one as the default one, but you can manually override the default toolchain on a project by project (technically, workspace by workspace) basis, either using a rust-toolchain file, or using command line option for cargo, or through environment variable "RUST_TOOLCHAIN", see overrides

if you are not writing C++ code, it doesn't really matter as far as rust cares, but generally you should install the newer SDK, and it should be mostly backward compatible anyway. you don't need to install multiple version of Windows SDK.

I don't the linked thread is relevant for you, but should you encounter any problem, fell free to ask for help on this forum. wish you a good happy journey learning rust.


I truly appreciate your detailed response and guidance on the part to glory learning Rust.

Thank you immensely.

Kind regards

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.