3 ms·
Aren't you describing the ideal scenario for WASM here? Some runtimes like wasmtime have a concept of fuel [1], which can limit the execution time. One of the
by whytevuhuni 2y ago
Aren't you describing the ideal scenario for WASM here? Some runtimes like wasmtime have a concept of fuel [1], which can limit the execution time.
One of the Rust-based Lua VMs, piccolo [2], was also made specifically with the ability to be interrupted in the middle of anything, by being stackless.
[1] https://docs.wasmtime.dev/api/wasmtime/struct.Store.html#method.set_fuel https://docs.wasmtime.dev/api/wasmtime/struct.Store.html#met...
[2] https://news.ycombinator.com/item?id=40239029 https://news.ycombinator.com/item?id=40239029 (see "Fuel" on its article)
- rollcat 2y agoActually Piccolo sounds like the ideal solution here, if I were to stick to LÖVE/Lua. It could be weird/confusing to have completely different VMs for the in-game contraptions vs the game engine itself (LuaJIT), but I think the narrow gap could attract players to become modders/contributors. Thanks for the suggestion!