ceifa / wasmoon

A real lua 5.4 VM with JS bindings made with webassembly
MIT License
449 stars 29 forks source link

Saving & Restoring state #116

Closed codingMASTER398 closed 1 month ago

codingMASTER398 commented 1 month ago

I have a very peculiar situation where I need to be able to save, then later on restore, the state (memory, variables, whatnot) of a Lua engine. Is there any way to do this currently?

ceifa commented 1 month ago

I think you can do it accessing the module directly. Emscripten exposes the virtual heap and stack for that.