Re:Libc++ 9.0.0 adds explicit support for WASI
by azakai on Friday October 11, 2019 @05:08PM
(#21228486)
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.
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/WebAssemb...
[2] https://www.youtube.com/watch?v=qQOP6jqZqf8