Lua.VM (Lua v1.0.0-rc.3)
View SourcePublic API for the Lua Virtual Machine.
Executes compiled Lua prototypes.
Summary
Functions
Executes a compiled prototype.
Functions
@spec execute(Lua.Compiler.Prototype.t(), Lua.VM.State.t(), keyword()) :: {:ok, list(), Lua.VM.State.t()}
Executes a compiled prototype.
Returns {:ok, results, state} on success.
Options
:reset_instructions- (defaulttrue) reset the:max_instructionsinstruction tally to 0 before executing. True at a genuine top-level evaluation (Lua.eval/eval!). Internal re-entries that run mid-evaluation — notablyrequire, which loads and runs a module's chunk through this function — must passfalseso the module body accumulates against the one per-evaluation budget instead of resetting it.