|
| 1 | +- Feature Name: promote-aarch64-apple-darwin-to-tier-1 |
| 2 | +- Start Date: 2024-07-09 |
| 3 | +- RFC PR: [rust-lang/rfcs#0000](https://github.com/rust-lang/rfcs/pull/0000) |
| 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-apple-darwin to Tier 1. |
| 10 | + |
| 11 | +# Motivation |
| 12 | +[motivation]: #motivation |
| 13 | + |
| 14 | +Approximately [33% of Rust users][survey-2023] use macOS for |
| 15 | +development. Hardware using Apple Silicon CPUs is noticeably more |
| 16 | +performant than previous x86\_64 Apple hardware and many developers |
| 17 | +have already transitioned to using aarch64-apple-darwin. This number |
| 18 | +is expected to increase as Apple no longer produces x86\_64 hardware. |
| 19 | + |
| 20 | +# Guide-level explanation |
| 21 | +[guide-level-explanation]: #guide-level-explanation |
| 22 | + |
| 23 | +This change will not require additional explanation to Rust |
| 24 | +programmers as many people believe that aarch64-apple-darwin is |
| 25 | +_already_ Tier 1. As such, I expect this change will reduce potential |
| 26 | +confusion. |
| 27 | + |
| 28 | +# Reference-level explanation |
| 29 | +[reference-level-explanation]: #reference-level-explanation |
| 30 | + |
| 31 | +Tier 1 targets must adhere to the [Tier 1 Target |
| 32 | +Policy][tier-1-policy]. This RFC intends that aarch64-apple-darwin |
| 33 | +will be Tier 1 [with host tools][host-tools]. Going through these |
| 34 | +requirements point-by-point: |
| 35 | + |
| 36 | +> Tier 1 targets must have substantial, widespread interest within the |
| 37 | +> developer community, and must serve the ongoing needs of multiple |
| 38 | +> production users of Rust across multiple organizations or projects. |
| 39 | +
|
| 40 | +As [stated above][motivation], macOS users comprise a non-trivial |
| 41 | +percentage of overall Rust users. |
| 42 | + |
| 43 | +> The target maintainer team must include at least 3 developers. |
| 44 | +
|
| 45 | +There is an existing [team for Apple and macOS specific |
| 46 | +concerns][apple-team]. The aarch64-apple-darwin target is actively |
| 47 | +used and maintained. Rust has been [tracking and fixing Apple Silicon |
| 48 | +specific issues][silicon-issues] and the LLVM team has been doing the |
| 49 | +same. |
| 50 | + |
| 51 | +> The target must build and pass tests reliably in CI, for all |
| 52 | +> components that Rust's CI considers mandatory. |
| 53 | +
|
| 54 | +Since [2024-02-06][enabled-m1], Rust continuous integration has been |
| 55 | +building and testing the aarch64-apple-darwin compiler and host tools |
| 56 | +with roughly the same settings as x86\_64. |
| 57 | + |
| 58 | +> The target must provide as much of the Rust standard library as is |
| 59 | +> feasible and appropriate to provide. |
| 60 | +
|
| 61 | +No material difference exists between the x86\_64-apple-darwin and |
| 62 | +aarch64-apple-darwin targets in this regard. |
| 63 | + |
| 64 | +> Building the target and running the testsuite for the target must not take |
| 65 | +> substantially longer than other targets, and should not substantially raise |
| 66 | +> the maintenance burden of the CI infrastructure. |
| 67 | +
|
| 68 | +Due to improved hardware performance, aarch64-apple-darwin is usually |
| 69 | +faster than x86\_64-apple-darwin. As a recent example, |
| 70 | +[aarch64-apple-darwin took 61 minutes][dist-build-aarch64] while |
| 71 | +[x86\_64-apple-darwin took 118 minutes][dist-build-x86\_64]. |
| 72 | + |
| 73 | +> Tier 1 targets must not have a hard requirement for signed, verified, or |
| 74 | +> otherwise "approved" binaries. |
| 75 | +
|
| 76 | +No material difference exists between the x86\_64-apple-darwin and |
| 77 | +aarch64-apple-darwin targets in this regard. |
| 78 | + |
| 79 | +# Drawbacks |
| 80 | +[drawbacks]: #drawbacks |
| 81 | + |
| 82 | +Tier 1 status requires that we are able to build and run binaries for |
| 83 | +the platform. While x86\_64 machines have been available in continuous |
| 84 | +integration workflows for many years, aarch64 machines are relatively |
| 85 | +new. The first Apple Silicon runners for GitHub Actions were [released |
| 86 | +on 2023-10-02][runner-m1] with free runners for open source projects |
| 87 | +[released on 2024-01-03][runner-m1-oss]. Availability or robustness of |
| 88 | +these runners may be lower compared to x86\_64. |
| 89 | + |
| 90 | +Tier 1 status requires increased continuous integration resource usage |
| 91 | +which means increased cost to the project. However, the |
| 92 | +aarch64-apple-darwin target has been treated as Tier 1 since |
| 93 | +[2024-02-06][enabled-m1] without causing financial concern. |
| 94 | + |
| 95 | + |
| 96 | +# Rationale and alternatives |
| 97 | +[rationale-and-alternatives]: #rationale-and-alternatives |
| 98 | + |
| 99 | +Apple Silicon is the _de facto_ path forward for macOS. |
| 100 | + |
| 101 | +# Prior art |
| 102 | +[prior-art]: #prior-art |
| 103 | + |
| 104 | +- [RFC 2959][rfc-2959] promoted `aarch64-unknown-linux-gnu` to Tier 1. |
| 105 | + |
| 106 | +# Unresolved questions |
| 107 | +[unresolved-questions]: #unresolved-questions |
| 108 | + |
| 109 | +None. |
| 110 | + |
| 111 | +# Future possibilities |
| 112 | +[future-possibilities]: #future-possibilities |
| 113 | + |
| 114 | +It is expected that **x86\_64**-apple-darwin will be demoted to Tier 2 |
| 115 | +at some future point as hardware for this platform is [no longer being |
| 116 | +produced][transition]. This may reduce our continuous integration |
| 117 | +costs, offsetting any increases from adding |
| 118 | +aarch64-apple-darwin. There are **no concrete plans** to demote |
| 119 | +x86\_64-apple-darwin at this time and any such demotion would need its |
| 120 | +own well-publicized RFC. |
| 121 | + |
| 122 | +[apple-team]: https://github.com/rust-lang/team/blob/16fc8a96bf2733bc0e7ca553a645f3840ed0a7a4/teams/apple.toml |
| 123 | +[dist-build-aarch64]: https://github.com/rust-lang-ci/rust/actions/runs/9856130302/job/27212491241 |
| 124 | +[dist-build-x86\_64]: https://github.com/rust-lang-ci/rust/actions/runs/9856130302/job/27212490161 |
| 125 | +[enabled-m1]: https://github.com/rust-lang/rust/pull/120509 |
| 126 | +[host-tools]: https://doc.rust-lang.org/nightly/rustc/target-tier-policy.html#tier-1-with-host-tools |
| 127 | +[rfc-2959]: https://rust-lang.github.io/rfcs/2959-promote-aarch64-unknown-linux-gnu-to-tier1.html |
| 128 | +[runner-m1-oss]: https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/ |
| 129 | +[runner-m1]: https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/ |
| 130 | +[silicon-issues]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+sort%3Aupdated-desc+label%3AO-macos+label%3AO-AArch64 |
| 131 | +[survey-2023]: https://blog.rust-lang.org/2024/02/19/2023-Rust-Annual-Survey-2023-results.html |
| 132 | +[tier-1-policy]: https://doc.rust-lang.org/nightly/rustc/target-tier-policy.html#tier-1-target-policy |
| 133 | +[transition]: https://en.wikipedia.org/wiki/Mac_transition_to_Apple_silicon |
0 commit comments