You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there are no declared minimal versions for tools used with windows-gnu targets. When somebody has problem with their old tooling, it's usually recommended to try with what Rust uses on the CI, which is nontrivial to figure out (FYI, it's https://github.com/niXman/mingw-builds-binaries/releases/tag/14.1.0-rt_v12-rev0). This translates to:
GCC 14.1.0
Binutils 2.42
mingw-w64 12.0.0
Settling on the minimal versions for the tools will be hard because there are numbers of recent fixes that would benefit Rust, so I'll list notable fixes and corresponding Binutils version which is the most important component to us (because it's the most troublesome):
enabling native TLS - it wasn't done previously in Rust because the binaries were crashing. GCC 16 landed support for native TLS and hit the same Binutils bugs as we did previously. Notable fixes:
Versioning of other components isn't as much important to Rust:
mingw-w64 provides headers, libs and objects enabling use of Windows built-in libraries, so you typically want to always use latest version (many toolchains use latest trunk); with raw-dylib this has become much less important
GCC provides unwind library and C/C++ compiler, we'd be fine with whatever can build our dependencies like LLVM
Toolchains available in the open:
Details
MSYS2 (Windows native):
GCC 16.1
Binutils 2.46
mingw-w64 trunk
mingw-w64-builds (Windows native):
GCC 16.1
Binutils 2.46
mingw-w64 14.0.0
w64devkit (Windows native):
GCC 16.1
Binutils 2.46
mingw-w64 14.0.0
Arch Linux:
GCC 16.1
Binutils 2.46
mingw-w64 14.0.0
Debian stable:
GCC 14.2
Binutils 2.43.1
mingw-w64 12.0.0
Debian testing/unstable:
GCC 15.2
Binutils 2.45
mingw-w64 14.0.0
Fedora 42:
GCC 14.2
Binutils 2.43.1
mingw-w64 12.0.0
Fedora 43:
GCC 15.2
Binutils 2.45.1
mingw-w64 13.0.0
Fedora 44:
GCC 16.1
Binutils 2.46
mingw-w64 13.0.0
Ubuntu 24.04 LTS:
GCC 13.2
Binutils 2.41
mingw-w64 11.0.1
Ubuntu 26.04 LTS:
GCC 13.2
Binutils 2.45
mingw-w64 13.0.0
cross-rs
GCC 9.3/9.4 (x86_64/i686)
Binutils 2.34
mingw-w64 7.0.0
I hope that we can figure out in the discussion (using a poll?) which version should we make as the baseline. Personally I'd like if we could make it Binutils 2.44 and enable native TLS (as a subsequent work), but this might be a hot take.
Additional thing to consider
Since mingw-w64 12.0.0, UCRT is the default CRT library, but the distributions tend to conservatively keep MSVCRT as the default (except Arch Linux), and provide UCRT as a separate package. UCRT is recommended by MSYS2 and more popular choice at mingw-w64-builds when comparing download counts.
If'd feel like a missed opportunity if we went with this MCP and remained stuck at MSVCRT.
How it works?
Mingw-w64 provides three libs:
libmsvcrt-os.a - Windows MSVCRT import lib
libucrt.a - Windows UCRT import lib
libmsvcrt.a - UCRT with mingw-w64 12, unless configured otherwise
GCC, Clang and rustc all link the CRT via -lmsvcrt, so the binary will use whatever the toolchain uses by default. There is a caveat however, mixing different CRTs is nontrivial and should be avoided unless use knows what they're doing.
While Rust's artifacts so far work with both MSVCRT and UCRT toolchains, making UCRT the default one could save us headaches in the future.
Proposal
Currently, there are no declared minimal versions for tools used with windows-gnu targets. When somebody has problem with their old tooling, it's usually recommended to try with what Rust uses on the CI, which is nontrivial to figure out (FYI, it's https://github.com/niXman/mingw-builds-binaries/releases/tag/14.1.0-rt_v12-rev0). This translates to:
Settling on the minimal versions for the tools will be hard because there are numbers of recent fixes that would benefit Rust, so I'll list notable fixes and corresponding Binutils version which is the most important component to us (because it's the most troublesome):
Versioning of other components isn't as much important to Rust:
raw-dylibthis has become much less importantToolchains available in the open:
Details
I hope that we can figure out in the discussion (using a poll?) which version should we make as the baseline. Personally I'd like if we could make it Binutils 2.44 and enable native TLS (as a subsequent work), but this might be a hot take.
Additional thing to consider
Since mingw-w64 12.0.0, UCRT is the default CRT library, but the distributions tend to conservatively keep MSVCRT as the default (except Arch Linux), and provide UCRT as a separate package. UCRT is recommended by MSYS2 and more popular choice at mingw-w64-builds when comparing download counts.
If'd feel like a missed opportunity if we went with this MCP and remained stuck at MSVCRT.
How it works?
Mingw-w64 provides three libs:
GCC, Clang and rustc all link the CRT via
-lmsvcrt, so the binary will use whatever the toolchain uses by default. There is a caveat however, mixing different CRTs is nontrivial and should be avoided unless use knows what they're doing.While Rust's artifacts so far work with both MSVCRT and UCRT toolchains, making UCRT the default one could save us headaches in the future.
Mentors or Reviewers
Process
The main points of the Major Change Process are as follows:
@rustbot secondor kickoff a team FCP with@rfcbot fcp $RESOLUTION.You can read more about Major Change Proposals on forge.
Caution
Concerns (1 active)
Managed by
@rustbot—see help for details.