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

Add bundled support for Mac aarch64 through Rosetta #394

Merged
merged 2 commits into from
Dec 8, 2020

Conversation

repi
Copy link
Sponsor Contributor

@repi repi commented Nov 17, 2020

Enable usage of bundled protoc when building for Mac on Apple Silicon (aarch64) by simply re-using the existing x86_64 OS X binary and have Rosetta seamlessly translate it.

One could later replace this with a natively compiled OS X aarch64 binary, but this was a quick easy solution and Rosetta is really quite efficient so likely is good enough for most.

Fix #393

@danburkert
Copy link
Collaborator

I don't have hardware to test this on, nor am I aware of any way to test through CI - can you confirm it's working on the new hardware? Other than that PR LGTM.

@danburkert
Copy link
Collaborator

WRT shipping a native binary we are beholden to upstream protobuf to start publishing that, and it looks like the latest release doesn't include it. Should be easy to add here when it does get done upstream: https://github.com/danburkert/prost/blob/master/prost-build/third-party/update-bundled-protobuf.sh#L18

@repi
Copy link
Sponsor Contributor Author

repi commented Dec 2, 2020

@danburkert yes confirmed that this worked when running on the Apple DTK which unblocked us. but would be good to have a second party confirmation on the real Apple M1 final hardware and software.

@hrydgard could you on your M1 try building this branch and see if it works on your new M1 Mac if you have the time?

@hrydgard
Copy link

hrydgard commented Dec 3, 2020

Works just fine on M1. Tested with cargo test.

@kali
Copy link

kali commented Dec 4, 2020

I can also confirm it's working on M1.

@hrydgard
Copy link

hrydgard commented Dec 8, 2020

Let's just get this trivial change in? It's a good interim solution.

@danburkert
Copy link
Collaborator

Thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bundled Mac aarch64 binary support
4 participants