I was thinking about wasi-libc and was wondering if you would recommend it for a language backend interested in wasm compilation? Are there any limitations to using it? Say for example I wanted to provide socket support for a scripting language.
There are much better people who can/will answer, but I do want to point you to componetize-py
which is written using wasi-libc (a fork, for now) and might be worth taking a look at if you haven't yet!
.NET, Rust, and LLVM/Clang also use wasi-libc when targeting WASI. Note that you don't need to use wasi-libc to target WASI -- it's just convenient if you already target a POSIX-like environment. Alternatively, you could target WASI directly without any kind of POSIX emulation; I believe that's what Go does.
BTW, componentize-py
only uses a fork of wasi-libc because Rust didn't have native wasm32-wasip2
support until recently. I've just opened an issue to switch to upstream.
Joel Dice said:
.NET, Rust, and LLVM/Clang also use wasi-libc when targeting WASI. Note that you don't need to use wasi-libc to target WASI -- it's just convenient if you already target a POSIX-like environment. Alternatively, you could target WASI directly without any kind of POSIX emulation; I believe that's what Go does.
Awesome thank you!
Last updated: Nov 22 2024 at 17:03 UTC