mlua icon indicating copy to clipboard operation
mlua copied to clipboard

Added `wasm32-wasi` support

Open martindevans opened this issue 1 year ago • 4 comments

It looks like mlua already supports wasm through wasm32-unknown-emscripten, would it be possible to add wasm32-wasi support as well?

martindevans avatar Feb 07 '24 23:02 martindevans

I would love to support wasi, but currently the blocker is exception handling See notable limitations on the wasi-sdk page c++ exceptions or setjmp/longjmp is required for Lua VM

khvzak avatar Feb 08 '24 16:02 khvzak

Thanks for the response.

How does wasm32-unknown-emscripten work around the lack of exceptions or setjmp/longjmp?

martindevans avatar Feb 08 '24 16:02 martindevans

How does wasm32-unknown-emscripten work around the lack of exceptions or setjmp/longjmp?

Seems it support native wasm exceptions if enabled, or javascript exceptions otherwise. See setjmp-longjmp and C++ exceptions support pages

khvzak avatar Feb 08 '24 17:02 khvzak