ceifa / wasmoon

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

Saving & Restoring state #116

Closed codingMASTER398 closed 5 months ago

codingMASTER398 commented 5 months 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 5 months ago

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