Provide an optional bounded Lua evaluator with transactional host results #17

Closed
opened 2026-12-02 21:37:07 +00:00 by faumaray · 1 comment
Owner

Stoneheart at Home is embedding a pinned Lua 5.4.9 interpreter for a saved game episode. We checked the public modules, sources and standalone tests at 7b0fea6. The pin provides execution, serialization and error-handling primitives. We could not find a script runner with bounded allocation, execution and host calls. The open and closed issue lists contained no matching request.

Would the maintainers consider an optional bounded Lua text evaluator, or an equivalent generic interface? Our Windows x64 consumer needs a fixed set of host functions, integer-keyed inputs, explicit source, allocator, VM-instruction, host-work and result limits, and a protected call that returns an owned result or a structured error. Inputs and committed host state must remain intact on failure. Game-specific triggers, commands, checkpoint formats and source policy belong downstream.

We can replace our local host when the same fixed input yields identical owned results across repeated executions and process restarts, bounded failures discard all partial output, and a subsequent valid evaluation succeeds. Our game will verify the same saved episode before and after the switch. Consumer requirements · Lua 5.4 manual

Stoneheart at Home is embedding a pinned Lua 5.4.9 interpreter for a saved game episode. We checked the public modules, sources and standalone tests at [7b0fea6](https://git.faumaray.com/Void/Library/src/commit/7b0fea6095f603f9e1904f66dfdc7752f4be4792). The pin provides execution, serialization and error-handling primitives. We could not find a script runner with bounded allocation, execution and host calls. The open and closed issue lists contained no matching request. Would the maintainers consider an optional bounded Lua text evaluator, or an equivalent generic interface? Our Windows x64 consumer needs a fixed set of host functions, integer-keyed inputs, explicit source, allocator, VM-instruction, host-work and result limits, and a protected call that returns an owned result or a structured error. Inputs and committed host state must remain intact on failure. Game-specific triggers, commands, checkpoint formats and source policy belong downstream. We can replace our local host when the same fixed input yields identical owned results across repeated executions and process restarts, bounded failures discard all partial output, and a subsequent valid evaluation succeeds. Our game will verify the same saved episode before and after the switch. [Consumer requirements](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/src/branch/chore/plans/docs/plan/systems/S19.md) · [Lua 5.4 manual](https://www.lua.org/manual/5.4/manual.html)
Author
Owner

Implemented on branch issue/17-bounded-lua (local commit 7f47c4e).

New Script module with a bounded Lua 5.4 evaluator (Lua fetched via FetchContent when no system package exists): allocator, instruction, host call and result limits, integer-keyed inputs, recorded host invocations and a structured protected-call error.

Merge request: #33

Implemented on branch `issue/17-bounded-lua` (local commit `7f47c4e`). New `Script` module with a bounded Lua 5.4 evaluator (Lua fetched via FetchContent when no system package exists): allocator, instruction, host call and result limits, integer-keyed inputs, recorded host invocations and a structured protected-call error. Merge request: https://git.faumaray.com/Void/Library/pulls/33
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Void/Library#17