How to build Rust targets "*-win7-windows-msvc" myself?

⚓ Rust    📅 2025-10-28    👤 surdeus    👁️ 7      

surdeus

Warning

This post was published 34 days ago. The information described in this article may have changed.

Hello!

I'm trying to build the Rust targets *-win7-windows-msvc.

As described here:

Unfortunately, the instructions are very vague :thinking:

What I did, so far, is this:

  1. Clone the Rust source code from https://github.com/rust-lang/rust.git
  2. Add Python 3.14 and Git for Windows to the PATH, because otherwise x.py would crash.
  3. Copy bootstrap.example.toml to bootstrap.toml
  4. Edit bootstrap.toml and append:
    [build]
    build-stage = 1
    target = ["x86_64-win7-windows-msvc"]
    
  5. Run x.py build and wait... wait... wait...

After it stopped doing many things (and it didn't throw any errors, so I guess it was successful), I end up with a "build" directory that contains various build artifacts.

But the only thing I can find in there, that is somewhat related to "win7", apparently is:
build\host\stage1-std\x86_64-win7-windows-msvc\release

This directory contains a std.dll as well as libstd.rlib and libcore.rlib

There also is a rustc program, but it does not seem to be a "win7" version:
build\x86_64-pc-windows-msvc\stage2-rustc\x86_64-pc-windows-msvc\release\rustc-main.exe

Now, where do I go from here ???

Is it complete yet?

And, if so, how do I actually build my Rust app with the "win7" tool-chain?

What I need is that cargo build --target x86_64-win7-windows-msvc will work :sweat_smile:

Thank you for any advice!

(I'm building on Windows 11 with Visual Studio 2022, Python 3.14 and Git installed)

1 post - 1 participant

Read full topic

🏷️ Rust_feed