One year of Roto, a compiled scripting language for Rust
24 points by Hasnep 2 days ago | 6 comments
bakrisolo 5 minutes ago
Stateless scripting languages are a massive win when embedding into Rust. Trying to snapshot or manage complex engine state across a runtime boundary usually turns into a complete nightmare anyway.
replyevrimoztamur 24 minutes ago
Does anyone know if the Roto runtime is serde-able?
replyA 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.
terts 14 minutes ago
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.
reply
Nix is a language with built-in support for URI literals typed as strings [1], which is a source of confusion and edge-cases, and I believe the feature is now discouraged in general use.
[0] https://roto.docs.nlnetlabs.nl/en/stable/reference/language_...
[1] https://nix.dev/manual/nix/2.34/language/string-literals
[0]: https://codeberg.org/NLnetLabs/roto/pulls/358