On 8/22/22 5:35 AM, Florian Weimer wrote:
* Jan Staněk:
> Hi list,
> in order to be able to compile WASM natively on Fedora,
> I'm trying to package wasi-libc[1] to provide the Web Assembly System
> Interface.
>
> [1]:
https://github.com/WebAssembly/wasi-libc
>
> My trouble is that this is in essence a cross-compilation environment,
> and I have zero experience in trying to package these.
> Also, I did not have much luck in trying to find any related
> documentation.
Cc:ing Josh because Rust apparently already builds wasi-libc.
I doubt that right now, one static build of wasi-libc will be able to
support both the Rust use cases and the NodeJS use case. The versions
will likely be different, and the WASI interfaces are still evolving.
So if you package this separately, you probably should use paths with
“nodejs” in the name.
It might be fine to share this, as long as you are not patching upstream
wasi-libc in some weird way. Rust's use is pretty minimal from vanilla
sources, and mostly only updated when we need compatibility to build
with a new Clang, in wasi-libc's Makefile "check-symbols" target.