extism / js-pdk

Write Extism plugins in JavaScript & TypeScript
42 stars 16 forks source link

Unable to run wasm-merge with a Linux and docker based Docker image running on a Mac m1 #45

Closed Zwiterrion closed 4 months ago

Zwiterrion commented 4 months ago

I'm trying to install and run the js-pdk in a Docker image based on ubuntu:22.04. My docker runs on a mac m1.

When I run the install.sh script it always failed because the ARCH and OS variable didn't have the right values to fetch the binaryen release.

Actually, in the container I have the following values :

# uname -m 
aarch64

# uname
Linux

With these values, the script tried to retrieve the following release :

https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-arm64-linux.tar.gz

But, in the binaryen's list, I only find a version of arm64 for macOS.

To patch the installation script in this case, we can choose to download the x86 version, which can of course run on an arm architecture.

bhelx commented 4 months ago

Thanks for contributing! Perhaps if you have time we can follow up with a more generic fix. I think this is okay for now as it unblocks you.