Repository navigation
Description
On 2020-06-22, Apple announced that future computers will utilize Arm processors instead of x86_64 processors. This is the tracking issue for supporting that platform, commonly referred to as Apple Silicon.
⚠️ Don't rely on this thread to decide whether to purchase Apple Silicon hardware.⚠️
The Rust project does not make any guarantee on the level of support the compiler has.
Current status summary (2022-07-05)
-
There is no timeline for any level of support.
-
aarch64-apple-darwinis a tier 2 target and is available for download via rustup. This compiler can be used to cross-compile fromx86_64-apple-darwinas well as running natively on Arm. -
Compiler tests are not being run at this point, as CI has no way of executing them. This is a blocker for Tier 1 support.
-
The x86_64 version of
rustcworks under Rosetta, producing x86_64 binaries that themselves run under Rosetta.
About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is not meant for large scale discussion, questions, or bug reports about a feature. Instead, join the discussion and/or contribute in the #t-compiler/arm Zulip stream or open a new issue for bug reports. You are encouraged to comment here to link to related issues.
This tracking issue will be closely moderated in an attempt to maintain a high signal-to-noise ratio.
Steps
This is not yet intended to be an exhaustive or even accurate list of steps.
-
Find out if there is anyone inside the compiler team with the time to drive the effort forward. This will allow us to efficiently allocate the Developer Transition Kits (DTK), if we end up receiving any. There are no members of the compiler team actively working on this - Reach out to our contacts at Apple to see if DTKs are available, and to establish a line of communication if there are problems down the line. Please coordinate with the leads of the compiler and infra teams on Zulip on this.
- Achieve Tier 3 support:
Wait for proper support to be upstreamed into LLVM, and update the Rust compiler to pull the latest version of LLVM.- Our current LLVM supports targeting the appropriate hardware well enough.
- Update the libc crate's conditional compilation to account for the new target.
- Limit macOS
$INODE64symbol names to x86 and x86_64 libc#1817 (in libc 0.2.73)
- Limit macOS
- Update the cc crate to account for the new target.
- https://github.com/alexcrichton/cc-rs/pull/527 (in cc 1.0.58)
- Submit an initial target specification for
aarch64-apple-darwin. - Get the target specification into the bootstrap compiler.
- Achieve Tier 2 support:
- Get Xcode 12 on our CI
- Update the openssl-src crate to account for the new target.
- Setup a cross-compiling builder to reach Tier 2
- Add to CI (Set up CI for aarch64-apple-darwin #75991)
- Build Cargo (Enable building Cargo for aarch64-apple-darwin #77239)
- Distribute binaries (Include aarch64-apple-darwin in the dist manifests #77895)
- Achieve Tier 1 support:
- Entire test suite passes
- Increase the quality and reliability of the target
- Hook up target hardware to our CI, and start running the test suite as part of our standard QA process.
- Propose the promotion to Tier 1.
- Miscellaneous
- Rustup
- Add support to rustup (Build for aarch64-apple-darwin rustup#2521)
- Release it (Provide full Apple Silicon (arm64/AArch64-Apple-Darwin) support in rustup rustup#2413)
- Rustup
Resolved Questions
- The infra team does not want to maintain our own hardware / VMs. This means solutions like MacStadium, AWS, or "putting our own hardware under someone's desk" are non-starters.
Unresolved Questions
This is not yet intended to be an exhaustive or even accurate list of questions.
- When will our CI providers have access to native hardware?
- Should we use an alternative / additional CI provider to GitHub?
- What is an accurate target name for the new platform?
- What is the accurate name of the chip ("silicon", "aarch64", "arm64", etc.)?
- How can we leave room to support Apple's
arm64e?
Activity
hasanihunter commentedon Jul 2, 2020
shepmaster commentedon Jul 2, 2020
rudyrichter commentedon Jul 13, 2020
shepmaster commentedon Jul 13, 2020
shepmaster commentedon Jul 20, 2020
Absolucy commentedon Jul 23, 2020
I am currently adding PAC/arm64e to a fork using Apple's LLVM. Hopefully some of my work can be reused whenever PAC/arm64e support is upstreamed into LLVM.
glandium commentedon Aug 11, 2020
Not sure if I should open a separate issue, but running the x86-64 rustc on a DTK (via Rosetta 2) yields
<jemalloc>: Unsupported system page sizemessages (but things still work), so it's likely that the arm64 port would need some adjustment in that area. (Not sure if the x86-64 rustc should be adjusted to to work without those messages under Rosetta 2)(The issue being that the page size is 16KB instead of 4KB)
glandium commentedon Aug 13, 2020
For the record, I've built the rust compiler on the DTK with #75500, a tweak to stage0.txt to pick a recent nightly, and a config.toml that sets the following:
and was subsequently able to build all the rust code in Firefox but I had to make changes to three crates that were passing the wrong --target to clang because the rust target differs from the clang target (rust uses aarch64-apple-darwin, clang uses arm64-apple-darwin). This is very unfortunate, and it's probably going to cause problems in other crates.
pnkfelix commentedon Aug 27, 2020
I'm throwing a link to #74820 on here because I suspect we'll want to better understand that bug before we can stabilize a Tier 1 ARM target.
Absolucy commentedon Aug 27, 2020
69 remaining items
shepmaster commentedon Oct 2, 2023
GitHub recently announced the public beta availability of Apple Silicon builders for GitHub Actions. We are as excited as you are about this news, and we plan on trying them out as soon as possible! After we have had a chance to do so, we'll be sure to report back here. Thanks for hanging in there for as long as you have, and we hope to have more good news in the near future.
rami3l commentedon Mar 15, 2024
Small update: Recently we have been running the full Rustup test suite on
aarch64-apple-darwinwith the newmacos-14runner and so far it's doing great: rust-lang/rustup#3681 🎉shepmaster commentedon Jul 9, 2024
I have opened RFC 3671 to promote aarch64-apple-darwin to Tier 1.
evieluvsrainbows commentedon Aug 3, 2024
PR #128592 promotes
aarch64-apple-darwinto Tier 1, as per the newly merged RFC.Rollup merge of rust-lang#128592 - evelynharthbrooke:master, r=Mark-S…
Rollup merge of rust-lang#128592 - evelynharthbrooke:master, r=Mark-S…
Unrolled build for rust-lang#128592
evieluvsrainbows commentedon Aug 11, 2024
As of today, ARM64 macOS (Darwin) is an officially recognized tier 1 target. I am proposing that this issue be closed now as the main goal of having arm64 macOS be an officially supported Tier 1 target has been reached.
ehuss commentedon Aug 11, 2024
Thanks @evelynharthbrooke! I'll go ahead and close as completed by #128592.
ci: add aarch64-apple-darwin (native Apple Silicon) build target
ci: add aarch64-apple-darwin (native Apple Silicon) build target (#947)