2 ms·
Emscripten does use some WASI APIs already, both normally and especially in standalone mode [1]. But yeah, for now WASI and wasm don't provide enough to do thi
by azakai 7y ago
Emscripten does use some WASI APIs already, both normally and especially in standalone mode [1].
But yeah, for now WASI and wasm don't provide enough to do things like C++ exceptions, longjmp, etc., so Emscripten supports them using non-WASI APIs.
Native exception handling for wasm is being worked on. If we don't want to wait for that, we could do exceptions using Asyncify [2]. But since we have the JS+wasm option for now, and native support coming, that's maybe not worth it.
[1] https://github.com/emscripten-core/emscripten/wiki/WebAssembly-Standalone https://github.com/emscripten-core/emscripten/wiki/WebAssemb...
[2] https://www.youtube.com/watch?v=qQOP6jqZqf8 https://www.youtube.com/watch?v=qQOP6jqZqf8