Skip to content
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

Support ARM builds for macOS #775

Closed
chriskrycho opened this issue Jun 22, 2020 · 16 comments
Closed

Support ARM builds for macOS #775

chriskrycho opened this issue Jun 22, 2020 · 16 comments

Comments

@chriskrycho
Copy link
Contributor

chriskrycho commented Jun 22, 2020

At WWDC 2020, Apple announced upcoming Macs will ship with ARM processors. We'll want to add support for those as soon as makes good sense:

  • when Rust itself supports the target architecture
  • once someone has a dev kit we can use for testing (this may end up being me, since I have interest for side projects)

This is currently blocked:

  • Rust support should come quickly, since Apple's ARM 64 targets are already in the general support matrix—but are currently Tier 2 targets per the Forge, and Rust will need to do some work to bump that up to a Tier 1 support category. (Presumably the existing aarch64-apple-ios is the same architecture, which could make an interesting situation name-wise. 😂)
  • Getting a dev kit is a matter of applying for one and being approved. I'll investigate on that front since it's potentially of interest to me anyway.
@charlespierce
Copy link
Contributor

Another blocker to be aware of: Currently there are no ARM builds of Node for MacOS. There are Linux ARM64 builds, which I believe Volta supports (though it needs to be manually compiled since we don't create pre-packaged binaries for it), but as of right now there aren't any pre-built Node binaries to download for darwin-arm64

@chriskrycho
Copy link
Contributor Author

Indeed! I actually just mentioned as much in my application for a dev kit. 🤞

@jrock2004
Copy link

I just tried install Volta on linux and its not supported. So maybe it makes sense to get linux working first?

@chriskrycho
Copy link
Contributor Author

@jrock2004 can you elaborate? We definitely have a bunch of users on Linux, so are you meaning Linux with ARM specifically?

@jrock2004
Copy link

@chriskrycho This is what I get

image

@chriskrycho
Copy link
Contributor Author

Thanks for the report! Which OS and what architecture are you running?

@jrock2004
Copy link

Ubuntu server for raspberry pi 4 on ARM

@chriskrycho
Copy link
Contributor Author

Thanks! That's helpful, and it is a great suggestion as a starting point here!

@charlespierce
Copy link
Contributor

@jrock2004 That's true, as I noted above, we don't currently create pre-built binaries that work with our installer for Linux in ARM. I do believe that Volta itself supports that architecture, but it would require building from source, which may or may not be feasible for your use-case.

It unfortunately looks like GitHub actions doesn't currently support architectures other than x86_64, so that could be a blocker for both creating a Linux + ARM build and for this issue. My first test would be to try with cargo cross and see if we can make a cross-architecture build, but I don't know much about that.

@rwjblue
Copy link
Contributor

rwjblue commented Jun 24, 2020

Could we use Docker for ARM on Linux?

@charlespierce charlespierce added this to Features in Backlog Jul 20, 2020
@charlespierce
Copy link
Contributor

One other thing to consider, we should implement #34 as well as checking the architecture when trying to download Node, so we know if the version is available for the Mac + ARM combination.

@chriskrycho
Copy link
Contributor Author

Note: the relevant architecture is now a Tier 2 supported target; I will see if I can give this a go on my DTK next week. (And hey, maybe not too long after than, on regular hardware!)

@jasonsilberman
Copy link

Just wanted to check in on this, how are things going?

@chriskrycho
Copy link
Contributor Author

Haven't had a chance to poke at it yet, but my discussions with the Rust folks working on it indicated (a) it should be pretty straightforward to build, including automated builds once GitHub Actions supports it, and (b) the Rosetta version should work just fine in the meantime.

@charlespierce
Copy link
Contributor

A couple of notes that we'll probably need to fix even once things compile:

  • The installer showing an error for ARM architecture, if we detect MacOS + ARM we should treat that the same as x64 (at least until we support M1 natively, then we should handle it correctly)
  • Once we have M1 support, we'll need to have a plan for Node versions: Newer versions will start to include native builds, but older versions we'll need to fall back to the x64 and rely on Rosetta. We should also include that in the documentation so users know that about older versions.

@charlespierce charlespierce changed the title [blocked] Support ARM builds for macOS Support ARM builds for macOS Jan 15, 2021
@charlespierce
Copy link
Contributor

Done in the 1.0.1 release! Also added #919 to track supporting M1 native Node builds once they become available.

Backlog automation moved this from Features to Done Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Backlog
  
Done
Development

No branches or pull requests

5 participants