wasmer-go
wasmer-go copied to clipboard
adding wasmer_runtime_c_api for musl
Thanks for the bug report!
Describe the bug
I create a wasmer_runtime_c_api for musl to be able to deploy my Wasmer Go application using the super small Alpine based Docker image. I copied it to the wasmer directory, but CGO always select the wasmer_runtime_c_api.so instead of my static wasmer_runtime_c_api.a library.
Because Alpine is non glibc compatible, linking go-ext-wasm with wasmer_runtime_c_api.so fails. But linking it with the static library I created for musl works fine.
Question
1-What is the best way to add the musl based static library and make bridge.go to link the right library ? 2- When linking with my static library int32_t is not recognized when I define an extern C based function. any clue why its that ?
Thanks -- Diego
Since 8 days, we officially support musl (see https://github.com/wasmerio/wasmer/pull/1180). We can wait the next release (will happen in few days) to update go-ext-wasm
and see if everything fits together. Thoughts?
Any plan to update to the new wasmer capi from 0.14.1 ?
Yes, we are working on updating it.
More info: https://github.com/wasmerio/go-ext-wasm/pull/120 (note: it should be merged soon)
thanks, I don't see in #120 the static libwasmer library being added. I think the only way to link on musl ( Alpine ) is with a static library. It is still work in progress ?
It is still a WIP.
Hi, Any update on this ? Thanks
Didn't make any progress on that front for the moment. I'm moving it on top of my todo list!
Waiting on https://github.com/wasmerio/wasmer/pull/2003.
It seems like everything is merged β how does one compile a Go binary using wasmer-go
on Alpine (Docker alpine image in my case)?
I think we would need to support static lib (not a big deal) before proposing musl builds. Thoughts?