fengari icon indicating copy to clipboard operation
fengari copied to clipboard

WasmGC based Lua implementation?

Open rweichler opened this issue 8 months ago • 1 comments

https://developer.chrome.com/blog/wasmgc https://reddit.com/r/Kotlin/comments/1hg5az6/wasmgc_is_now_available_in_all_major_browsers/

WasmGC is supported in Safari as of 4 months ago, does anyone know if this makes switching back to the original PUC Lua codebase feasible? If I'm not mistaken this is basically the main reason fengari was written in JS, because you couldn't control the GC

I feel like a PUC Lua + WasmGC codebase would be easier to maintain

rweichler avatar Apr 25 '25 04:04 rweichler

https://v8.dev/blog/wasm-gc-porting

In comparison, traditional ports to WasmMVP can be simpler and quicker: for example, you can compile the Lua VM (written in C) to Wasm in just a few minutes. A WasmGC port of Lua, on the other hand, would require more effort as you’d need to write code to lower Lua’s constructs into WasmGC structs and arrays, and you’d need to decide how to actually do that within the specific constraints of the WasmGC type system.

rweichler avatar May 01 '25 13:05 rweichler