-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: allow and pick darwin x86_64 binary on apple silicon macs #564
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.
Oh huh, that's pretty neat. Definitely a good fix in the meantime. Thanks for trying it out and for putting this together. I'll have to trust you that it works since I don't have access to a M1 myself.
This has been released. Please let me know if this works for you or not. |
Yes, can confirm. |
@sod I get |
Do you have rosetta 2 installed? |
nop, oh I have to you use rosetta2 on this ? |
x86 binaries don't run natively on m1. They have to be transpiled by rosetta 2 to function. Native darwin arm64 binary for esbuild is not possible at this time, as golang has no support for it yet. |
And you don't have to actively "use rosetta 2", it just has to be installed and then just transparently compiles x86 binaries to arm64 when it encounters one. |
Oh thx! Work as expected! |
Heads up that this might not be completely smooth sailing. The Hugo project (another Go-based web development tool) is getting reports of emulation issues with running Go-based code with Rosetta 2: gohugoio/hugo#7968. I'm not yet aware of any reports like this from esbuild users but I wouldn't be surprised if it comes up. |
@sod, it is ok if you install go from head if you don't want to wait Go 1.16. Working great! |
When you try to npm install esbuild on a m1 mac, you see this error:
Allow and pick darwin x86_64 binary on apple silicon macs. It'll run just fine through rosetta 2 translation, at least throwing the 8.4MB typescript.js file against it works without complaining:
Native darwin arm64 seems not to be supported yet by golang. It's planned for go v1.16 (from golang/go#42756)