-
Notifications
You must be signed in to change notification settings - Fork 25
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 support for Apple Silicon (arm64) binaries #46
Add support for Apple Silicon (arm64) binaries #46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a reasonable approach! After this lands I'll get a PR going to bump the version, then we can cut a release, and publish to crates.io.
src/artifact_choosing.rs
Outdated
static PLATFORM_KEYWORDS: &[&str] = &["macos-x86_64", "darwin-x86_64", "macos", "darwin"]; | ||
|
||
#[cfg(all(target_os = "macos", target_arch = "aarch64"))] | ||
static PLATFORM_KEYWORDS: &[&str] = &["macos-arm64", "darwin-arm64", "macos-x86_64", "darwin-x86_64", "macos", "darwin"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming some of these won't work for M1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x86_64 apps work with Rosetta2 (with caveats), which most users will have installed, because we are in the transitory period right now https://support.apple.com/en-us/HT211861
The primary caveat is that dependencies installation can be tricky for x86_64. E.g. if x86_64 binary depends on OpenSSL, user would need to install x86_64 version of OpenSSL.
Thus we should prefer to use arm binaries.
If x86_64 binary has no runtime dependecies, it should work just fine if Rosetta2 is installed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case I think it's all good because foreman will try to find the first asset in that list, which will make it prioritize the correct specific binaries. Thanks for your contribution 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add an entry to the changelog? Then it's good to go
Include architecture name in macOS platform keywords
Add arm64 foreman build