-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide full Apple Silicon (arm64/AArch64-Apple-Darwin) support in rustup #2413
Comments
when adding a arm64 to the aarch64 switch case, the next error one gets is: rustup: command failed: downloader https://static.rust-lang.org/rustup/dist/aarch64-apple-darwin/rustup-init /var/folders/sq/89_rr1cd3h7g3643mmd1lg280000gn/T/tmp.fP8JB2EA/rustup-init aarch64-apple-darwin |
Main Compiler support seems to be tracked at |
There's no real work to be done here — Rustup compiles fine on the DTK. Once there are official Rust builds, rustup tarballs will be able to be created and uploaded. The most I see so far is updating the shell script as appropriate.
Unfortunately, the tests don't yet run:
|
The shell script is still real work. However, if there's no Rust coding to do then the real work boils down to the shell script changes needed and the CI work needed. |
Yes, I neglected to mention the CI work, mostly because that's something that is broadly unknown — we don't even know how we are going to do it for Rust itself yet. There's likely to be some way to cross-compile from x86_64 to aarch64 (which is what I've done by hand so far), but not actually execute the tests. My hope is that the shell script changes will be a one or two line change (maybe just rewriting |
I am hoping we will implement something to ensure that the target is properly supported as a triple, as part of |
Status: The current assumption is that things will "just work" in the next rustup release. |
When is the next release date to get support for Apple M1? |
There's a few more issues we need to resolve before the next release, but I'm hoping within a couple of weeks for the rustup release. |
For people who don't mind getting their hands dirty, you can download the x86_64 version of rustup and then build the current development branch natively.
Of course, this will be whatever arbitrary commit you check out, but I think it's fine 😇 |
I found that with these instructions most crates fail to build. I saw that building with |
Ah, yeah, that might be running into some (as far as I can tell) Apple bugs invoking
And, after doing that:
Thanks for that specific environment variable trick; I've added it to the intermediate README. See also: |
The workaround with
edit: Got it! It won't work until some GUI app on macOS causes it to install Rosetta first. |
For others that run into this, iirc you can also install Rosetta 2 via terminal by running |
In case anybody else besides me runs into the issue that compiling with cargo doesn't work properly via Rosetta 2 (SIGKILL at random times, binary doesn't execute), take a look at this solution: mozilla/sccache#880 (comment) |
Looks like rustup is about to release v1.23.0 with native aarch64-apple-darwin support really soon, as they've updated the changelog and bumped the version in preparation for release today and merged master into stable. We're just waiting for the final steps, whatever those are, and deployment. The workaround shouldn't be neccessary after the update, right? |
Yes, because this issue is caused by running cargo in x86 emulation, which happens because rustup is running in x86 emulation. For now, this workaround also has the advantage of having faster compile times (although I'm not really feeling a difference here TBH, Rosetta 2 is pretty good). |
@anlumo is that any different from the solution posted seven days ago in this thread? |
How long does it take between the merge to |
When it is published, it should be available here: https://static.rust-lang.org/rustup/dist/aarch64-apple-darwin/rustup-init |
Since there's so much interest here, I thought I'd give an update. We are probably a day or two away from releasing publically assuming nothing odd goes wrong with our test release. To test the current test release you could try:
If any of that doesn't work then please let me know. |
Looks good to me!
|
@kinnison running your supplied curl command string results in this error when attempting an install on a vanilla MBA 13 M1. |
You want to change the default toolchain to either beta or nightly.
|
This is handy to know @glandium thanks. When I write the blog post I'll try and remember to mention that. |
Rustup 1.23.0 is now out. |
Thank you! |
@shepmaster you did most of the work :D |
@kinnison @shepmaster you guys are awesome! |
I'm still seeing this:
Do I still need to enable the beta channel? |
Yes, until 1.49.0 is released, which, if I'm not mistaken, should happen in 2 weeks (although considering that would be during the holidays, I don't know if the usual 6 weeks schedule is going to stand). |
OK so I need to pass the |
Latest rustup is native. You can use |
Describe the problem you are trying to solve
Provide full compatibility for Apple Silicon (AArch64/Arm64) based macs. DTKs are out there now, user facing machines will be soonish.
Describe the solution you'd like
Let AArch64-Apple-Darwin just be a fully supported platform for rustup
Notes
Note that apple currently reports arm64 as architecture.
current output:
The text was updated successfully, but these errors were encountered: