wasm4
wasm4 copied to clipboard
WASI SDK actually needed?
WASI SDK's README notes that "all that's done here is to provide builds configured to set the default target and sysroot for convenience." Should instructions be included on how to use upstream Clang / LLVM instead of this SDK?
The only reason we suggest the WASI SDK is that it comes with libc. Most distributions of clang can build for wasm out of the box, but they don't include a wasm-ready libc, which limits things quite a lot.
Perhaps it could fall back to system clang
if WASI_SDK
is not set.
I personally don't use any libc functions because they tend to increase binary size quite a bit, and I think a lot of users would be OK without them too. memset
is the only one I needed for my own games, but that can be implemented as either a 3 line function or a single inline asm directive.