logoalt Hacker News

evrimoztamurtoday at 8:57 AM1 replyview on HN

Does anyone know if the Roto runtime is serde-able?

A big problem I encountered in using Lua in Rust for my game engine was that I wasn't able to serde the Lua runtime such that I can snapshot a game session and save it in a file, and retrieve it in another context.


Replies

tertstoday at 9:07 AM

Hi! Author here. What we call the `Runtime` in Roto is not a state of the program, it's only the set of functions, types and constants that are available to the script. Roto scripts cannot really keep state at the moment. The advantage of that is that it allows you to run scripts in parallel. We're thinking about how we can keep that property while also having some state.