Skip to content

Commit ceca0a0

Browse files
authored
Merge pull request #3771 from Noratrieb/i686-pc-windows-gnu
RFC: Demote i686-pc-windows-gnu to Tier 2
2 parents 2defc68 + 0ed9e1a commit ceca0a0

File tree

1 file changed

+174
-0
lines changed

1 file changed

+174
-0
lines changed
+174
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
- Feature Name: none
2+
- Start Date: (fill me in with today's date, 2025-02-11)
3+
- RFC PR: [rust-lang/rfcs#3771](https://github.com/rust-lang/rfcs/pull/3771)
4+
- Rust Issue: [rust-lang/rust#0000](https://github.com/rust-lang/rust/issues/0000)
5+
6+
# Summary
7+
[summary]: #summary
8+
9+
Demote target `i686-pc-windows-gnu` from Tier 1 to Tier 2 (with host tools) to better reflect its current maintenance and usage status.
10+
11+
# Motivation
12+
[motivation]: #motivation
13+
14+
## Background
15+
16+
Rust has supported Windows for a long time, with two different flavors of Windows targets: MSVC-based and GNU-based.
17+
MSVC-based targets (for example the main Windows target `x86_64-pc-windows-msvc`) use Microsoft's native `link.exe` linker and libraries, while GNU-based targets (like `i686-pc-windows-gnu`) are built entirely from free software components like `gcc`, `ld`, and MinGW.
18+
19+
The major reason to use a GNU-based toolchain instead of the native MSVC-based one is cross-compilation and licensing. `link.exe` only runs on Windows (barring Wine hacks) and requires a license for commercial usage.
20+
21+
Rust currently supports the following major Windows targets. They all have host tools. The download count was extracted from [the public dashboard](https://p.datadoghq.com/sb/3a172e20-e9e1-11ed-80e3-da7ad0900002-60425c7cb1b7beb2e8959a305a301c0c?fromUser=false&refresh_mode=sliding&from_ts=1736618152507&to_ts=1739210152507&live=true) on 2025-02-10.
22+
We also show the `std` download counts to account for cross-compilation usage.
23+
24+
| Name | Tier | `rustc` download count | `std` download count
25+
| -------- | -------- | ---- | ------ |
26+
| `x86_64-pc-windows-msvc` | 1 | 6.72M | 3.56M |
27+
| `x86_64-pc-windows-gnu` | 1 | 375K | 1.06M |
28+
| `i686-pc-windows-msvc` | 1 | 260k | 793K |
29+
| `i686-pc-windows-gnu` | 1 | 76K | 56K |
30+
| `aarch64-pc-windows-msvc` | 2 | 46K | 241K |
31+
32+
To put the download numbers into perspective, some other targets:
33+
34+
| Name | Tier | `rustc` download count | `std` download count
35+
| -------- | -------- | ---- | ------ |
36+
| `x86_64-unknown-linux-gnu` | 1 | 135M | 65M |
37+
| `i686-unknown-linux-gnu` | 1 | 332K | 437K |
38+
| `x86_64-unknown-freebsd` | 2 | 138K | 89K |
39+
| `x86_64-unknown-netbsd` | 2 | 36K | 32K |
40+
41+
From the download count alone, `i686-pc-windows-gnu` better fits in next to other Tier 2 targets like FreeBSD and NetBSD.
42+
43+
But that is not everything. GNU-based Windows targets are, as the description at the start may imply, an alternative (you could say non-standard) way to compile for Windows, and as such subject to many kinds of unique problems.
44+
The Rust Project currently does not have a lot of expertise for dealing with these issues.
45+
The setup and build for Windows GNU is complicated and prone to errors, often failing in CI, leading to frequent efforts to fix them being carried out by people who are, at best, familiar with 64-bit Windows or Windows MSVC.
46+
This results in Windows-GNU problems often being unaddressed, or worse: fixed in ways that turn up more errors later down the line.
47+
48+
Some example problems, found by searching for `ignore-windows-gnu` in rust-lang/rust.
49+
50+
- https://github.com/rust-lang/rust/issues/128973
51+
- https://github.com/rust-lang/rust/issues/128981
52+
- https://github.com/rust-lang/rust/pull/116837
53+
- https://github.com/rust-lang/rust/issues/128911
54+
55+
### 32-bit x86 Problems
56+
57+
While some of these issues apply to all GNU-based targets, 32-bit x86 seems to be especially affected.
58+
And when a 32-bit Windows GNU issue comes up, contributors rarely actually investigate it, because it is such a complex and nonstandard environment compared to 64-bit Windows GNU, which is a lot easier to set up and work with.
59+
60+
That the 32-bit x86 architecture is unusual, and made moreso by how Windows operates on it, has also been noted by Windows experts[^2].
61+
The Windows GNU experts that provide direct support to the Rust project focus almost exclusively on the 64-bit targets, and have previously recommended the retirement of the 32-bit targets[^1].
62+
63+
MSYS2, a major distributor of the GNU-based Windows platform, has been [dropping some 32-bit packages](https://www.msys2.org/news/#2023-12-13-starting-to-drop-some-32-bit-packages) and [no longer distributes Clang for 32-bit](https://github.com/msys2/MINGW-packages/pull/21998), showing even their shift away from the platform.
64+
In response to inquiries about their opinion on reducing support for the target, [MSYS2 folks were positive](https://github.com/msys2/MINGW-packages/issues/23346).
65+
66+
[^1]: despite saying he is only a maintainer for x86_64-pc-windows-gnullvm, mati865 is effectively also our maintainer for x86_64-pc-windows-gnu https://rust-lang.zulipchat.com/#narrow/channel/233931-t-compiler.2Fmajor-changes/topic/Demote.20.60i686-pc-windows-gnu.60.20compiler-team.23822/near/490675824
67+
[^2]: https://devblogs.microsoft.com/oldnewthing/20220418-00/?p=106489
68+
69+
## Target Tier Policy Requirements
70+
71+
With this knowledge, we can look at the [Tier 1 requirements](https://doc.rust-lang.org/1.84.1/rustc/target-tier-policy.html#tier-1-target-policy) of the target tier policy to check whether they are fulfilled.
72+
73+
> *Tier 1 targets must have substantial, widespread interest within the developer community, and must serve the ongoing needs of multiple production users of Rust across multiple organizations or projects.*
74+
75+
While this cannot be quantified precisely, the download counts suggest that this target is less popular than some other Tier 2 targets like FreeBSD.
76+
Therefore, we are going to treat this as false.
77+
78+
> The target maintainer team must include at least 3 developers.
79+
80+
This is not the case at all. There is currently no maintainer team.
81+
Though we should note that this is currently also true for many other Tier 1 targets, as this is a new rule not upheld everywhere yet.
82+
But experience tells that it is highly unlikely that 3 maintainers for 32 bit Windows GNU will be found.
83+
84+
> The target must build and pass tests reliably in CI, for all components that Rust's CI considers mandatory.
85+
86+
As mentioned above, there are issues and it does cause a fair share of problems.
87+
88+
> The target must not disable an excessive number of tests or pieces of tests in the testsuite in order to do so. This is a subjective requirement.
89+
90+
A fair amount of tests are disabled with an open issue with no comments.
91+
I would say that it is on the edge of being excessive, not quite having reached that amount (but it is likely that will be reached eventually).
92+
For example, [#134777](https://github.com/rust-lang/rust/pull/134777) observed and un-ignored a lot of ignored Windows tests, many of which were likely ignored on all of Windows because of Windows GNU issues.
93+
Another example of an ignored test is [#135572](https://github.com/rust-lang/rust/pull/135572) that does not support Windows GNU because it was too mcuh effort to test locally.
94+
95+
> The target must provide as much of the Rust standard library as is feasible and appropriate to provide [...].
96+
97+
Windows is well-supported in the standard library.
98+
99+
> Building the target and running the testsuite for the target must not take substantially longer than other targets
100+
101+
Building `i686-pc-windows-gnu` is reasonably fast.
102+
103+
> If running the testsuite requires additional infrastructure
104+
105+
GitHub Actions has Windows support, which is used for `i686-pc-windows-gnu` (on a 64-bit host), no external infrastructure is required.
106+
107+
> Tier 1 targets must not have a hard requirement for signed, verified, or otherwise "approved" binaries.
108+
109+
There are no such requirements.
110+
111+
> All requirements for tier 2 apply.
112+
113+
We will not go through Tier 2 requirements here, but they are, apart from the (less strict than Tier 1) maintainer requirements, fulfilled.
114+
When the maintainer requirements are enforced more strictly in the future, `i686-pc-windows-gnu` (and `x86_64-pc-windows-gnu` as well) may be demoted further if no maintainers are found.
115+
116+
## Conclusion
117+
118+
Given the usage count and lack of maintenance leading to more than one requirement not being fulfilled, it becomes clear that `i686-pc-windows-gnu` is not worthy of being a Tier 1 target and is already getting much worse support than expected from a Tier 1 target.
119+
120+
# Explanation
121+
[explanation]: #explanation
122+
123+
`i686-pc-windows-gnu` is now a [Tier 2 with Host Tools](https://doc.rust-lang.org/1.84.1/rustc/target-tier-policy.html#tier-2-target-policy) target instead of a [Tier 1 With Host Tools](https://doc.rust-lang.org/1.84.1/rustc/target-tier-policy.html#tier-1-target-policy) target.
124+
Official builds of the standard library and rustc **continue to be distributed** for this target, but it is no longer tested in CI.
125+
If necessary, further demotions (for example removing host tools) will not require RFCs, but go through a simpler [MCP](https://forge.rust-lang.org/compiler/mcp.html) instead.
126+
127+
A blog post will be made to describe the change.
128+
129+
# Drawbacks
130+
[drawbacks]: #drawbacks
131+
132+
By no longer doing automated testing for this target, this target will likely deteriorate more quickly than with continued automated testing.
133+
134+
Additionally, this opens the door for further demotions in the future, like removing host tools, which could still be useful to some people.
135+
But such demotions will always have to be justified on their own.
136+
137+
# Rationale and alternatives
138+
[rationale-and-alternatives]: #rationale-and-alternatives
139+
140+
The maintenance requirement violation can be solved by multiple people stepping up to maintain this target. This has not happened so far.
141+
142+
The popularity requirement could be fulfilled by more people using this target, but this does not seem possible, as 32-bit x86 as been on a decline for a long time, as new CPU models for this architecture are no longer being made.
143+
144+
# Prior art
145+
[prior-art]: #prior-art
146+
147+
This is the first time [since the Target Tier Policy was created](https://rust-lang.github.io/rfcs/2803-target-tier-policy.html) (note that this links to an old version, see [the rustc book](https://doc.rust-lang.org/1.84.1/rustc/target-tier-policy.html) for the latest version at the time of writing) that a Tier 1 target is being demoted.
148+
149+
Before that, there has been the [demotion of `i686-apple-darwin` from Tier 1 to Tier 3 in 2019](https://github.com/rust-lang/rfcs/pull/2837).
150+
The reasoning there was mostly Apple's support being removed, which is not the case here.
151+
The measures in this RFC are much less drastic.
152+
153+
The [promotion of `aarch64-apple-darwin` to Tier 1](https://github.com/rust-lang/rfcs/pull/3671) cited popularity as the major motivation, matching unpopularity as one of the motivations here.
154+
155+
This is a continuation of [MCP 822](https://github.com/rust-lang/compiler-team/issues/822), which contains some additional details in the description and linked Zulip stream.
156+
157+
# Unresolved questions
158+
[unresolved-questions]: #unresolved-questions
159+
160+
None so far.
161+
162+
# Future possibilities
163+
[future-possibilities]: #future-possibilities
164+
165+
`x86_64-pc-windows-gnu` will remain a Tier 1 target after this RFC.
166+
While its popularity is more aligned with Tier 1, it suffers from the same lack of maintenance (but to a lesser degree) as its 32-bit cousin.
167+
It may be demoted as well in the future.
168+
169+
`i686-pc-windows-gnu` may be demoted to a Tier 2 target without host tools in the future if it is not deemed useful enough.
170+
This will likely happen in the near future, but is not part of this RFC.
171+
That demotion will not need an RFC.
172+
173+
The `*-windows-gnullvm` targets, which are based on LLVM instead of GNU tools, may see increased maintenance and popularity in the future, replacing the `*-windows-gnu` targets.
174+
But it seems unlikely that `i686-pc-windows-gnullvm` would ever acquire Tier 1 status.

0 commit comments

Comments
 (0)