|
| 1 | +- Feature Name: promote-aarch64-pc-windows-msvc-to-tier-1 |
| 2 | +- Start Date: 2025-05-22 |
| 3 | +- RFC PR: [rust-lang/rfcs#3817](https://github.com/rust-lang/rfcs/pull/3817) |
| 4 | +- Rust Issue: [rust-lang/rust#0000](https://github.com/rust-lang/rust/issues/0000) |
| 5 | + |
| 6 | +# Summary |
| 7 | +[summary]: #summary |
| 8 | + |
| 9 | +Promote aarch64-pc-windows-msvc to Tier 1 with Host Tools. |
| 10 | + |
| 11 | +# Motivation |
| 12 | +[motivation]: #motivation |
| 13 | + |
| 14 | +About [30% of Rust users use Windows][survey-2024], while the majority of these developers and their |
| 15 | +customers are using x64 hardware, the usage of Arm64 Windows has been growing since it was first |
| 16 | +made available in Windows 10, and has been accelerating, especially with the availability of the |
| 17 | +SnapDragon X processors. |
| 18 | + |
| 19 | +# Guide-level explanation |
| 20 | +[guide-level-explanation]: #guide-level-explanation |
| 21 | + |
| 22 | +No changes required: Rust tooling for Arm64 Windows has been available for a while now so this |
| 23 | +doesn't affect the end user experience. |
| 24 | + |
| 25 | +# Reference-level explanation |
| 26 | +[reference-level-explanation]: #reference-level-explanation |
| 27 | + |
| 28 | +Tier 1 targets must adhere to the [Tier 1 Target Policy][tier-1-policy]. Going through these |
| 29 | +requirements point-by-point: |
| 30 | + |
| 31 | +> Tier 1 targets must have substantial, widespread interest within the developer community, and must |
| 32 | +> serve the ongoing needs of multiple production users of Rust across multiple organizations or |
| 33 | +> projects. These requirements are subjective, and determined by consensus of the approving teams. |
| 34 | +
|
| 35 | +As mentioned above, Windows users comprise a substantial proportion of Rust developers, and Arm64 |
| 36 | +hardware is increasingly being used by them and their customers. |
| 37 | + |
| 38 | +> The target maintainer team must include at least 3 developers. |
| 39 | +
|
| 40 | +There is an existing [Windows team for Rust][windows-team] and, within Microsoft, Arm64 Windows is |
| 41 | +considered to be a Tier 1 target for internal Rust usage. |
| 42 | + |
| 43 | +> The target must build and pass tests reliably in CI, for all components that Rust's CI considers |
| 44 | +> mandatory. |
| 45 | +> The target must not disable an excessive number of tests or pieces of tests in the testsuite in |
| 46 | +> order to do so. This is a subjective requirement. |
| 47 | +
|
| 48 | +[The `dist-aarch64-msvc` CI job has been running reliably for over 4 years now][promote-tier-2], |
| 49 | +and I have [new CI jobs working where Rust is built and tested on Arm64 Windows runners][ci-draft-pr]. |
| 50 | + |
| 51 | +The following tests had to be disabled for `aarch64-pc-windows-msvc`: |
| 52 | +- [Tests in `std::fs` that require symlinks][disable-fs]: this is a limitation of the runner image |
| 53 | + and I've [filed an issue to have it fixed][fix-symlinks]. |
| 54 | +- [Various debug info tests][disable-debuginfo] |
| 55 | + - `tests/debuginfo/step-into-match.rs`: Stepping out of functions behaves differently. |
| 56 | + - `tests/debuginfo/type-names.rs`: Arm64 Windows cdb doesn't support JavaScript extensions. I've |
| 57 | + filed a bug internally with the debugger team to have this fixed. |
| 58 | + - `tests/ui/runtime/backtrace-debuginfo.rs`: Backtraces are truncated. I've filed |
| 59 | + [an issue to investigate this][backtrace-issue]. |
| 60 | + |
| 61 | +> The target must provide as much of the Rust standard library as is feasible and appropriate to |
| 62 | +> provide. |
| 63 | +
|
| 64 | +The full Standard Library is available. |
| 65 | + |
| 66 | +> Building the target and running the testsuite for the target must not take substantially longer |
| 67 | +> than other targets, and should not substantially raise the maintenance burden of the CI |
| 68 | +> infrastructure. |
| 69 | +
|
| 70 | +[A `try` run of the new CI jobs completed in under 2 hours.][try-job] |
| 71 | + |
| 72 | +> If running the testsuite requires additional infrastructure (such as physical systems running the |
| 73 | +> target), the target maintainers must arrange to provide such resources to the Rust project, to the |
| 74 | +> satisfaction and approval of the Rust infrastructure team. |
| 75 | +> Such resources may be provided via cloud systems, via emulation, or via physical hardware. |
| 76 | +
|
| 77 | +The new CI jobs use the free [`windows-11-arm` runners provided by GitHub][runner-announcement]. |
| 78 | + |
| 79 | +> Tier 1 targets must not have a hard requirement for signed, verified, or otherwise "approved" |
| 80 | +> binaries. Developers must be able to build, run, and test binaries for the target on systems they |
| 81 | +> control, or provide such binaries for others to run. (Doing so may require enabling some |
| 82 | +> appropriate "developer mode" on such systems, but must not require the payment of any additional |
| 83 | +> fee or other consideration, or agreement to any onerous legal agreements.) |
| 84 | +
|
| 85 | +There are no differences between x64 and Arm64 Windows in this regard. |
| 86 | + |
| 87 | +> All requirements for tier 2 apply. |
| 88 | +
|
| 89 | +Going through the Tier 2 policies: |
| 90 | + |
| 91 | +> The target must not place undue burden on Rust developers not specifically concerned with that |
| 92 | +> target. Rust developers are expected to not gratuitously break a tier 2 target, but are not |
| 93 | +> expected to become experts in every tier 2 target, and are not expected to provide target-specific |
| 94 | +> implementations for every tier 2 target. |
| 95 | +
|
| 96 | +Understood. |
| 97 | + |
| 98 | +> The target must provide documentation for the Rust community explaining how to build for the |
| 99 | +> target using cross-compilation, and explaining how to run tests for the target. If at al |
| 100 | +> possible, this documentation should show how to run Rust programs and tests for the target using |
| 101 | +> emulation, to allow anyone to do so. If the target cannot be feasibly emulated, the documentation |
| 102 | +> should explain how to obtain and work with physical hardware, cloud systems, or equivalent. |
| 103 | +> The target must document its baseline expectations for the features or versions of CPUs, operating |
| 104 | +> systems, libraries, runtime environments, and similar. |
| 105 | +
|
| 106 | +Understood, as part of the promotion PR I will add a page to Platform Support. |
| 107 | + |
| 108 | +> The code generation backend for the target should not have deficiencies that invalidate Rust |
| 109 | +> safety properties, as evaluated by the Rust compiler team. |
| 110 | +
|
| 111 | +There are no known deficiencies in LLVM's support for Arm64 Windows. |
| 112 | + |
| 113 | +> If the target supports C code, and the target has an interoperable calling convention for C code, |
| 114 | +> the Rust target must support that C calling convention for the platform via `extern "C"`. The C |
| 115 | +> calling convention does not need to be the default Rust calling convention for the target, |
| 116 | +> however. |
| 117 | +
|
| 118 | +`extern "C"` correctly works for calling C code. |
| 119 | + |
| 120 | +> Tier 2 targets should, if at all possible, support cross-compiling. Tier 2 targets should not |
| 121 | +> require using the target as the host for builds, even if the target supports host tools. |
| 122 | +
|
| 123 | +`aarch64-pc-windows-msvc` can be cross-compiled from x86 and x64 Windows, or other platforms that |
| 124 | +can run those tools. |
| 125 | + |
| 126 | +> In addition to the legal requirements for all targets (specified in the tier 3 requirements), |
| 127 | +> because a tier 2 target typically involves the Rust project building and supplying various |
| 128 | +> compiled binaries, incorporating the target and redistributing any resulting compiled binaries |
| 129 | +> (e.g. built libraries, host tools if any) must not impose any onerous license requirements on any |
| 130 | +> members of the Rust project, including infrastructure team members and those operating CI systems. |
| 131 | +
|
| 132 | +There are no such license requirements for Arm64 Windows code. |
| 133 | + |
| 134 | +> Tier 2 targets must not impose burden on the authors of pull requests, or other developers in the |
| 135 | +> community, to ensure that tests pass for the target. |
| 136 | +
|
| 137 | +Understood. |
| 138 | + |
| 139 | +> The target maintainers should regularly run the testsuite for the target, and should fix any test |
| 140 | +> failures in a reasonably timely fashion. |
| 141 | +
|
| 142 | +Understood, and this will be automated once promoted to Tier 1. |
| 143 | + |
| 144 | +# Drawbacks |
| 145 | +[drawbacks]: #drawbacks |
| 146 | + |
| 147 | +The `windows-11-arm` runners provided by GitHub are relatively new, and so we do not know what the |
| 148 | +availability or reliability of these runners will be. |
| 149 | + |
| 150 | +# Rationale and alternatives |
| 151 | +[rationale-and-alternatives]: #rationale-and-alternatives |
| 152 | + |
| 153 | +`aarch64-pc-windows-msvc` could be left as a Tier 2 with Host Tools target, but given the importance |
| 154 | +of this target to Microsoft and the increasing usage of Arm64 by Windows users, it will become more |
| 155 | +and more likely that issues with this target will need to be treated as critical. Catching issues |
| 156 | +early in development will prevent the need to Beta and Stable backports. |
| 157 | + |
| 158 | +# Prior art |
| 159 | +[prior-art]: #prior-art |
| 160 | + |
| 161 | +- [RFC 2959][rfc-2959] promoted `aarch64-unknown-linux-gnu` to Tier 1. |
| 162 | +- [RFC 3671][rfc-3671] promoted `aarch64-apple-darwin` to Tier 1. |
| 163 | +- [`stdarch` has been using using `windows-11-arm` runners][stdarch-pr] since early May. |
| 164 | +- LLVM has dedicated [Arm64 Windows builders][llvm-builders]. |
| 165 | + |
| 166 | +# Unresolved questions |
| 167 | +[unresolved-questions]: #unresolved-questions |
| 168 | + |
| 169 | +None. |
| 170 | + |
| 171 | +# Future possibilities |
| 172 | +[future-possibilities]: #future-possibilities |
| 173 | + |
| 174 | +* Adding Arm64 Windows jobs to more Rust repos, such as `cargo`. |
| 175 | +* Promoting `arm64ec-pc-windows-msvc` to Tier 1. |
| 176 | +* Add a `aarch64-pc-windows-gnu` target. |
| 177 | +* Promote `aarch64-pc-windows-gnullvm` to Tier 1. |
| 178 | + |
| 179 | +[backtrace-issue]: https://github.com/rust-lang/rust/issues/140489 |
| 180 | +[ci-draft-pr]: https://github.com/rust-lang/rust/pull/140136 |
| 181 | +[disable-debuginfo]: https://github.com/rust-lang/rust/pull/140755 |
| 182 | +[disable-fs]: https://github.com/rust-lang/rust/pull/140759 |
| 183 | +[fix-symlinks]: https://github.com/actions/partner-runner-images/issues/94 |
| 184 | +[llvm-builders]: https://lab.llvm.org/buildbot/#/builders/161 |
| 185 | +[platform-support]: https://github.com/rust-lang/rust/blob/e3892a40a9d06034fdf2432a9d3d29fa97726299/src/doc/rustc/src/platform-support.md?plain=1#:~:text=aarch64%2Dpc%2Dwindows%2Dmsvc |
| 186 | +[promote-tier-2]: https://github.com/rust-lang/rust/pull/75914 |
| 187 | +[rfc-2959]: https://rust-lang.github.io/rfcs/2959-promote-aarch64-unknown-linux-gnu-to-tier1.html |
| 188 | +[rfc-3671]: https://rust-lang.github.io/rfcs/3671-promote-aarch64-apple-darwin-to-tier-1.html |
| 189 | +[runner-announcement]: https://github.com/orgs/community/discussions/155713 |
| 190 | +[stdarch-pr]: https://github.com/rust-lang/stdarch/pull/1785 |
| 191 | +[survey-2024]: https://blog.rust-lang.org/2025/02/13/2024-State-Of-Rust-Survey-results |
| 192 | +[tier-1-policy]: https://doc.rust-lang.org/rustc/target-tier-policy.html#tier-1-target-policy |
| 193 | +[try-job]: https://github.com/rust-lang-ci/rust/actions/runs/14871501014 |
| 194 | +[windows-team]: https://github.com/rust-lang/team/blob/055aa9ddb4e9a10c760042baa54da71b1585a821/teams/windows.toml |
0 commit comments