-
Notifications
You must be signed in to change notification settings - Fork 410
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
can't run wasm-pack build on aarch64 #754
Comments
It's a rustc issue actually, cc rust-lang/rust#52362 |
thanks. I read that thread before posting here, but it's not clear to me what's the actionable item: what's the path for me to got wasm-pack working on aarch64? |
Here's what I've done so far:
It uses system lld instead of rust-lld, but it fails to link:
|
same problem here. I'm trying to get it working on an aarch64 Android phone using Termux & their Rust pkg. Been trying to read their source code and they bundle in Cargo as well as maybe wasm32-unknown-unknown(?), but do so in a rustlib/aarch64-linux-android/lib directory instead of a separate 'wasm32-unknown-unknown' folder. Also, despite apparently using rustup in the build process, rustup isn't installed with the pkg and you can't install it with rust already installed. I tried that adding the 'wasm32-unknown-unknown' folder manually process, but it wasn't compatible even though the version numbers matched. I saw 'wasm-ld' is installed in my packages along with a bunch off llvm stuff and Googled around finally finding this little gem https://medium.com/@richardanaya/write-web-assembly-with-llvm-fbee788b2817 . I tried llc -mtriple=wasm32-unknown-unknown -O3 -filetype=obj main.ll -o main.o |
I also found this exceptionally well-written guide about the inner workings of the rustc compiler that fills in a lot of gaps for me: https://rust-lang.github.io/rustc-guide/ |
I posted the same question to Termux issues as well and the solution (at least for me) was to do pkg install rust-std-wasm32 instead of their general rust pkg. Not sure if that helps the OP here, but maybe it helps others like me. |
thanks @Choons ! that did the trick. Here's what I did:
It finally worked :) thanks! I'll close this issue. |
🐛 Bug description
I'm trying to follow the tutorial at https://rustwasm.github.io/book/game-of-life/hello-world.html but I'm failing at the step
wasm-pack build
:🤔 Expected Behavior
It should build the project as explained in the tutorial
👟 Steps to reproduce
Follow the steps of the tutorial (https://rustwasm.github.io/book/game-of-life/hello-world.html) on an aarch64 machine.
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: 0.8.1
rustc version: 1.39.0
arch: aarch64
The text was updated successfully, but these errors were encountered: