-
Notifications
You must be signed in to change notification settings - Fork 419
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 check for Apple Silicon Macs #952
Comments
I'm also getting set up on an M1 machine, although I build my wasm-pack from source so didn't run into this. Based on the NPM installer I think the project will also need to upload aarch64-apple-darwin binaries to GitHub Releases. |
Also FYI once you get it installed there are still some limitations, through no fault of wasm-pack's maintainers AIUI. |
You mention wasm-pack working flawlessly on M1 if installed via cargo or compiled from source. I run into the issue described at #907 when running wasm-pack compiled from source on an M1-based Mac. |
|
@iugo Ran into the same issue, tried |
Curl command doesn't work on M1, as @tholu stated above. Running |
Having followed the
|
Is there any plans to fix the curl installer and make the bundle universal or Apple Silicon compatible? |
Yes. This should work on an M1. I saw it uses the x86 but only if the |
@d3lm I think relying on Rosetta is a bad idea. Just like with Rosetta 1, someday Apple will remove support for Rosetta 2. It's best to support Apple Silicon natively for increased performance, and long term stability. Personally, I'm holding off installing Rosetta for as long as possible. Much more willing to put in the effort in migrating and finding alternatives now, as opposed to later when support is removed. |
@fishcharlie Yes, fair enough. If we can make this work without rosetta that'd be even better. Does that mean we need to build wasm-opt for aarch-64? |
In the installation process of Rust the default settings are as follows:
Using |
@XinyiXiang Using |
Yes I think so! |
I just tried via I'm seeing a bunch of different
|
Alright. A bit more reading and looks like this depends on Rosetta still - which isn't installed by default on macOS. Running |
+1 took a while to understand what is wrong... |
Fixed in v0.11.0. |
FYI it appears that 0.11.0 is looking for wasm-opt in the wrong path. A few minutes ago the build was working, I just upgraded wasm-pack, and now there's an error because it's looking for It finds the path correctly first, and then it looks like it fails when trying to execute it.
I was able to work around it by making a symbolic link:
|
I'm having the above issue on an m1 Mac with newly-upgraded wasm-pack v0.11.0 - it's trying
|
This was indeed not fixed as I encountered the same exact scenario @bbugh describes. On WSL2. |
@bbugh @mt-inside @3p3r Can you try out latest master? |
Success 🌮
|
Work on my machine :) Thanks! |
💡 Feature description
Include support for Apple Silicon Macs, e.g. the late 2020 MacBook Air, late 2020 MacBook Pro 13", and late 2020 Mac mini.
💻 Basic example
Currently, trying to install the
wasm-pack
library from either NPM or Yarn results in the following error:Installing
wasm-pack
via cargo (using the latest Darwin arm64 support included in Rust 1.49) works flawlessly. It's only the NPM and Yarn version that produces this error.The text was updated successfully, but these errors were encountered: