bytecodealliance / wizer

The WebAssembly Pre-Initializer
Apache License 2.0
957 stars 57 forks source link

Support alpine prebuild #93

Open njfamirm opened 1 year ago

njfamirm commented 1 year ago

Hi when I want to install @fastly/js-compute on Alpine Linux, it says wizer not found!

yarn build:app
> js-compute-runtime app/index.js
/app/node_modules/@bytecodealliance/wizer-linux-x64/wizer: not found
Error: Failed to compile JavaScript to Wasm:  Wizer initialization failure

this is the content of wizer node_module dir

ls -lrth node_modules/@bytecodealliance/wizer/

total 40K    
-rwxr-xr-x    1 root     root         853 Jun 25 15:47 wizer.js
-rw-r--r--    1 root     root        5.5K Jun 25 15:47 update.js
-rw-r--r--    1 root     root        1.1K Jun 25 15:47 package.json
-rw-r--r--    1 root     root         968 Jun 25 15:47 package-helpers.js
-rw-r--r--    1 root     root         727 Jun 25 15:47 index.js
-rw-r--r--    1 root     root         332 Jun 25 15:47 README.md
-rw-r--r--    1 root     root       12.0K Jun 25 15:47 LICENSE.md

based on @JakeChampion 's comment this error occurred because Alpine uses musl libc, that's don't prebuilt by wizer.

Please add this!

If you guide me, I can participate myself

njfamirm commented 1 year ago

maybe minimal change is add this to release workflow matrix

- build: x86_64-alpine
  os: alpine-latest
  target: x86_64-alpine-linux-musl
boxman0617 commented 7 months ago

bump. Is this something that could happen? I also need to use this on an alpine based image