Open c0mm4nd opened 4 years ago
Thanks for the report! This library uses CGO, however, and is as a result pretty dependant on the native C runtime. The prebuilt binaries checked into this repository and used on taggs only work with glibc, there's not a prebuilt binary for musl.
If you'd like, though, then we'd need to make a binary release for musl on wasmtime itself, and then that could get consumed here!
Docker is an important platform for deploying and distributing go applications, and the alpine container can effectively reduce the size of image. So it is worth to support it.
Docker is an important platform for deploying and distributing go applications, and the alpine container can effectively reduce the size of image. So it is worth to support it.
I agree that this would be great to support for this reason, yes.
If you'd like, though, then we'd need to make a binary release for musl on wasmtime itself, and then that could get consumed here!
So IIUC we'd need to add a musl build config to Wasmtime, and optionally use that in wasmtime-go?
It would be best that being auto-selected in alpine but optional in other linux distro.
If it impossible, providing a guide about manually installing wasmtime in system and letting wasmtime-go use external library would be also great.
So IIUC we'd need to add a musl build config to Wasmtime, and optionally use that in wasmtime-go?
I suppose if wasmtime was pushing a musl c-api tarball, we could use that here, and copy the file into build/
for the tags; from a the consuming side, it would then be a matter of importing
import (
_ "github.com/bytecodealliance/wasmtime-go/build/linux-x86_64" # glibc
_ "github.com/bytecodealliance/wasmtime-go/build/linux-x86_64-musl # musl
)
... but I could be missing something. 🤔
We're running into this with our project that uses OPA/wasm (which uses wasmtime-go internally). Does this mean wasmtime-go can't be used on an alpine base image until this is resolved?
It should be possible to make a custom build of Wasmtime for Alpine using musl-libc, but otherwise no, there is no precompiled binary for musl libc for you to use.
I've just hit this today, are there any specific steps I could help with?
Dockerfile
It seems an upstream issue between wasmtime and alpine(musl)?