Enable support for the WebAssembly exception handling proposal#942
Enable support for the WebAssembly exception handling proposal#942mjrusso wants to merge 1 commit into
Conversation
Add support for the WebAssembly exception handling proposal (Phase 4, Wasm 3.0 with exnref) via a new `wasm_exceptions` option in EngineConfig. This enables running WASM modules that use setjmp/longjmp emulation, for example modules compiled using Emscripten with the following flags: ``` -s SUPPORT_LONGJMP=wasm -s WASM_LEGACY_EXCEPTIONS=0 ```
|
(A bit of context: I'm working on automating WASM builds of Micro QuickJS. The most sane way to get this to work seems to be to use |
If anyone wants to test out mquickjs, automated builds are available at https://github.com/mjrusso/mquickjs-wasm. Download the latest release and run this single-file Elixir script (passing the path to the the WASM build you downloaded as an argument): Sample output: This should compile the wasmex NIF from source, provided that you have a Rust toolchain installed. |
This PR adds an option to enable the WebAssembly exception handling proposal (Phase 4, Wasm 3.0 with exnref) via a new
wasm_exceptionsoption inEngineConfig. This defaults to being disabled, which matches the status quo.