Hey,
I was playing around a bit to see if I could compile capnproto with the wasi-sdk or emscripten. wasi is a "web assembly system interface" that allows running wasm code completely without a JS runtime, while emscripten requires a browser/nodejs runtime. I think both options could be interesting for distributing software in a platform independent way.
However, it seems capnproto doesn't compile out of the box with either. When targeting wasi, it is missing a bunch of things such as pipes, signals, and exceptions as far as I understand from compile errors in kj exception and unix abstraction code. When targeting emscripting it actually compiles but has some missing symbols during linking, also related to exceptions:
https://github.com/emscripten-core/emscripten/issues/11985#issuecomment-1019317541
Would there be a way to compile capnproto without these problematic features, or a feasible way to provide wasi-specific stubs for them?
Cheers,
Pepijn