Versions in this module Expand all Collapse all v0 v0.1.2 Jul 5, 2026 v0.1.1 Jun 29, 2026 v0.1.0 Jun 28, 2026 Changes in this version + const LFieldsPerFlush + const LuaRelease + const LuaVersion + const MaxArgA + const MaxArgAx + const MaxArgB + const MaxArgBx + const MaxArgC + const MaxArgJ + const NoReg + const NumOpCodes + const OffsetsBx + const OffsetsC + const OffsetsJ + const OpAdd + const OpBAnd + const OpBNot + const OpBOr + const OpBXor + const OpDiv + const OpIDiv + const OpMod + const OpMul + const OpPow + const OpShl + const OpShr + const OpSub + const OpUnm + const PosA + const PosAx + const PosB + const PosBx + const PosC + const PosJ + const PosK + const PosOp + const SizeA + const SizeAx + const SizeB + const SizeBx + const SizeC + const SizeJ + const SizeOp + const TM_ADD + const TM_BAND + const TM_BNOT + const TM_BOR + const TM_BXOR + const TM_CALL + const TM_CLOSE + const TM_CONCAT + const TM_DIV + const TM_EQ + const TM_GC + const TM_IDIV + const TM_INDEX + const TM_LE + const TM_LEN + const TM_LT + const TM_MOD + const TM_MODE + const TM_MUL + const TM_N + const TM_NEWINDEX + const TM_POW + const TM_SHL + const TM_SHR + const TM_SUB + const TM_UNM + const TypeBoolean + const TypeFunction + const TypeLightUserData + const TypeNil + const TypeNumber + const TypeString + const TypeTable + const TypeThread + const TypeUserData + const VCALL + const VCONST + const VFALSE + const VINDEXED + const VINDEXI + const VINDEXSTR + const VINDEXUP + const VJMP + const VK + const VKFLT + const VKINT + const VKSTR + const VLOCAL + const VNIL + const VNONRELOC + const VRELOC + const VTRUE + const VUPVAL + const VVARARG + const VVOID + const VarKindCTConst + const VarKindConst + const VarKindReg + const VarKindToClose + const Version + var ErrorStackReserve = 200 + var False = Value + var IDSize = 60 + var LoadBufferSize = 8192 + var MaxCCalls = 200 + var MaxLexElement int + var MaxStack = 1000000 + var MaxTableArraySize int + var MaxTagLoop = 2000 + var Nil = Value + var True = Value + func Disasm(p *Proto) string + func DisasmInst(i Instruction) string + func FromValue(v Value) any + func GetArgA(i Instruction) int + func GetArgAx(i Instruction) int + func GetArgB(i Instruction) int + func GetArgBx(i Instruction) int + func GetArgC(i Instruction) int + func GetArgk(i Instruction) int + func GetArgsB(i Instruction) int + func GetArgsBx(i Instruction) int + func GetArgsC(i Instruction) int + func GetArgsJ(i Instruction) int + func Int2sC(i int) int + func LuacInst(i Instruction) string + func LuacListing(p *Proto) []string + func SC2int(i int) int + func SetArgA(i *Instruction, v int) + func SetArgAx(i *Instruction, v int) + func SetArgB(i *Instruction, v int) + func SetArgBx(i *Instruction, v int) + func SetArgC(i *Instruction, v int) + func SetArgk(i *Instruction, v int) + func SetArgsBx(i *Instruction, v int) + func SetArgsJ(i *Instruction, v int) + func SetOpCode(i *Instruction, o OpCode) + func Testk(i Instruction) bool + func VersionString() string + type BinOpr int + const OPR_ADD + const OPR_AND + const OPR_BAND + const OPR_BOR + const OPR_BXOR + const OPR_CONCAT + const OPR_DIV + const OPR_EQ + const OPR_GE + const OPR_GT + const OPR_IDIV + const OPR_LE + const OPR_LT + const OPR_MOD + const OPR_MUL + const OPR_NE + const OPR_NOBINOPR + const OPR_OR + const OPR_POW + const OPR_SHL + const OPR_SHR + const OPR_SUB + type Closure struct + type CompileError struct + Line int + Msg string + func (e *CompileError) Error() string + type Debugger struct + L *LState + func NewDebugger(L *LState) *Debugger + func (d *Debugger) AddBreakpoint(source string, line int) + func (d *Debugger) ClearBreakpoints() + func (d *Debugger) Continue() + func (d *Debugger) Detach() + func (d *Debugger) Frames() []Frame + func (d *Debugger) OnStop(fn func(d *Debugger, reason StopReason)) + func (d *Debugger) Pause() + func (d *Debugger) RemoveBreakpoint(source string, line int) + func (d *Debugger) SetBreakpoints(source string, lines []int) + func (d *Debugger) StepInto() + func (d *Debugger) StepOut() + func (d *Debugger) StepOver() + type Frame struct + L *LState + func (f Frame) CurrentLine() int + func (f Frame) Eval(expr string) ([]Value, error) + func (f Frame) Func() Value + func (f Frame) FuncName() (name, what string) + func (f Frame) IsLua() bool + func (f Frame) IsTailCall() bool + func (f Frame) IsVararg() bool + func (f Frame) Level() int + func (f Frame) Local(n int) (name string, v Value, ok bool) + func (f Frame) Locals() []Local + func (f Frame) NumParams() int + func (f Frame) NumUpvalues() int + func (f Frame) SetLocal(n int, v Value) bool + func (f Frame) SetUpvalue(n int, v Value) bool + func (f Frame) ShortSource() string + func (f Frame) Source() string + func (f Frame) Upvalue(n int) (name string, v Value, ok bool) + func (f Frame) Vararg(n int) (v Value, ok bool) + type FrameInfo struct + Func string + Level int + Line int + Source string + What string + type FuncState struct + type GoFunc func(L *LState) int + type GoHook func(L *LState, event HookEvent, line int) + type GoPanicError struct + Value any + func (e *GoPanicError) Error() string + type HookEvent uint8 + const HookCall + const HookCount + const HookLine + const HookReturn + const HookTailCall + func (e HookEvent) String() string + type HookMask int + const MaskCall + const MaskCount + const MaskLine + const MaskReturn + type Instruction uint32 + func CreateABCk(o OpCode, a, b, c, k int) Instruction + func CreateABx(o OpCode, a, bx int) Instruction + func CreateAx(o OpCode, a int) Instruction + func CreatesJ(o OpCode, j, k int) Instruction + type LState struct + func NewSandbox() *LState + func NewState(opts ...Option) *LState + func (L *LState) Arg(n int) Value + func (L *LState) ArgError(n int, msg string) + func (L *LState) Call(fn Value, args []Value, nresults int) ([]Value, error) + func (L *LState) CallProto(p *Proto, nresults int) ([]Value, error) + func (L *LState) CallProtoEnv(p *Proto, env *Table, nresults int) ([]Value, error) + func (L *LState) CallValue(fn Value, args []Value, nresults int) []Value + func (L *LState) CheckBool(n int) bool + func (L *LState) CheckInt(n int) int64 + func (L *LState) CheckNumber(n int) float64 + func (L *LState) CheckString(n int) string + func (L *LState) CheckTable(n int) *Table + func (L *LState) CheckUserData(n int, name string) any + func (L *LState) ClearGoHook() + func (L *LState) ClearInstructionLimit() + func (L *LState) Close() + func (L *LState) Context() context.Context + func (L *LState) DoFile(path string) ([]Value, error) + func (L *LState) DoString(src, name string) ([]Value, error) + func (L *LState) Frame(level int) (f Frame, ok bool) + func (L *LState) GetGlobal(name string) Value + func (L *LState) GetMetatable(name string) *Table + func (L *LState) Globals() *Table + func (L *LState) Index(t, key Value) Value + func (L *LState) InstructionCount() uint64 + func (L *LState) LoadFile(path string) (*Proto, error) + func (L *LState) NArgs() int + func (L *LState) NewMetatable(name string) (mt *Table, created bool) + func (L *LState) NewUserData(data any, meta *Table) Value + func (L *LState) NewUserDataUV(data any, nuv int, meta *Table) Value + func (L *LState) OpenBase() + func (L *LState) OpenCoroutine() + func (L *LState) OpenDebug() + func (L *LState) OpenIO() + func (L *LState) OpenLibs() + func (L *LState) OpenMath() + func (L *LState) OpenOS() + func (L *LState) OpenString() + func (L *LState) OpenTable() + func (L *LState) OpenUTF8() + func (L *LState) OptInt(n int, def int64) int64 + func (L *LState) OptString(n int, def string) string + func (L *LState) Preload(name string, open func(*LState) *Table) + func (L *LState) Push(v Value) + func (L *LState) RaiseError(format string, args ...any) int + func (L *LState) RaiseValue(v Value) int + func (L *LState) Register(name string, fn GoFunc) + func (L *LState) Requiref(name string, open func(*LState) *Table, glb bool) *Table + func (L *LState) RunWith(env *Table, src, name string) ([]Value, error) + func (L *LState) SetContext(ctx context.Context) + func (L *LState) SetGlobal(name string, v Value) + func (L *LState) SetGoHook(h GoHook, mask HookMask, count int) + func (L *LState) SetIndex(t, key, val Value) + func (L *LState) SetInstructionLimit(n uint64) + func (L *LState) SetRecoverGoPanics(on bool) + func (L *LState) SetUserMetatable(v Value, meta *Table) + func (L *LState) StackDepth() int + func (L *LState) TestUserData(n int, name string) any + func (L *LState) ToValue(x any) Value + func (L *LState) TypeError(n int, want string) + type LocVar struct + EndPc int + Name string + StartPc int + type Local struct + Index int + Name string + Value Value + type LuaError struct + func (e *LuaError) Error() string + func (e *LuaError) Traceback() string + func (e *LuaError) Unwrap() error + func (e *LuaError) Value() Value + type OpCode int + const OP_ADD + const OP_ADDI + const OP_ADDK + const OP_BAND + const OP_BANDK + const OP_BNOT + const OP_BOR + const OP_BORK + const OP_BXOR + const OP_BXORK + const OP_CALL + const OP_CLOSE + const OP_CLOSURE + const OP_CONCAT + const OP_DIV + const OP_DIVK + const OP_EQ + const OP_EQI + const OP_EQK + const OP_EXTRAARG + const OP_FORLOOP + const OP_FORPREP + const OP_GEI + const OP_GETFIELD + const OP_GETI + const OP_GETTABLE + const OP_GETTABUP + const OP_GETUPVAL + const OP_GTI + const OP_IDIV + const OP_IDIVK + const OP_JMP + const OP_LE + const OP_LEI + const OP_LEN + const OP_LFALSESKIP + const OP_LOADF + const OP_LOADFALSE + const OP_LOADI + const OP_LOADK + const OP_LOADKX + const OP_LOADNIL + const OP_LOADTRUE + const OP_LT + const OP_LTI + const OP_MMBIN + const OP_MMBINI + const OP_MMBINK + const OP_MOD + const OP_MODK + const OP_MOVE + const OP_MUL + const OP_MULK + const OP_NEWTABLE + const OP_NOT + const OP_POW + const OP_POWK + const OP_RETURN + const OP_RETURN0 + const OP_RETURN1 + const OP_SELF + const OP_SETFIELD + const OP_SETI + const OP_SETLIST + const OP_SETTABLE + const OP_SETTABUP + const OP_SETUPVAL + const OP_SHL + const OP_SHLI + const OP_SHR + const OP_SHRI + const OP_SUB + const OP_SUBK + const OP_TAILCALL + const OP_TBC + const OP_TEST + const OP_TESTSET + const OP_TFORCALL + const OP_TFORLOOP + const OP_TFORPREP + const OP_UNM + const OP_VARARG + const OP_VARARGPREP + func GetOpCode(i Instruction) OpCode + func (o OpCode) IsMM() bool + func (o OpCode) IsTest() bool + func (o OpCode) Mode() OpMode + func (o OpCode) Name() string + func (o OpCode) SetsA() bool + func (o OpCode) SetsTopOut() bool + func (o OpCode) UsesTopIn() bool + type OpMode int + const IABC + const IABx + const IAsBx + const IAx + const IsJ + type Option func(*buildOpts) + func WithContext(ctx context.Context) Option + func WithMaxCCalls(n int) Option + func WithMaxStack(n int) Option + func WithMaxTableArraySize(n int) Option + func WithOpenLibs() Option + func WithRecoverGoPanics() Option + func WithSandbox() Option + type Proto struct + Code []Instruction + Constants []Value + IsVararg bool + LastLineDef int + LineDefined int + LineInfo []int32 + LocVars []LocVar + MaxStackSize uint8 + NumParams uint8 + Protos []*Proto + Source string + Upvalues []UpvalDesc + func CompileReader(r io.Reader, name string) (*Proto, error) + func CompileString(src, name string) (*Proto, error) + func (p *Proto) AddConstant(v Value) int + func (p *Proto) LineAt(pc int) int + type RunResult struct + Err error + Values []Value + type Session struct + L *LState + func NewSession(L *LState, resolve SourceResolver) *Session + func (s *Session) Continue() + func (s *Session) Debugger() *Debugger + func (s *Session) Eval(level int, expr string) (string, error) + func (s *Session) Pause() + func (s *Session) SetBreakpoints(source string, lines []int) + func (s *Session) Snippet(id string, line, ctx int) (string, bool) + func (s *Session) Source(id string) (text string, ok bool) + func (s *Session) Stack() []FrameInfo + func (s *Session) Start(src, chunkName string) <-chan RunResult + func (s *Session) StepInto() + func (s *Session) StepOut() + func (s *Session) StepOver() + func (s *Session) Stops() <-chan StopState + func (s *Session) Variables(level int) []Var + type SourceResolver func(id string) (text string, ok bool) + type StopReason uint8 + const StopBreakpoint + const StopPause + const StopStep + func (r StopReason) String() string + type StopState struct + Depth int + Func string + Line int + Reason StopReason + Source string + type TMS int + type Table struct + func NewTable() *Table + func (t *Table) Get(key Value) Value + func (t *Table) GetInt(i int64) Value + func (t *Table) GetStr(name string) Value + func (t *Table) Len() int64 + func (t *Table) Next(key Value) (k, v Value, ok bool) + func (t *Table) Set(key, val Value) + func (t *Table) SetInt(i int64, val Value) + func (t *Table) SetStr(name string, val Value) + func (t *Table) Value() Value + type UnOpr int + const OPR_BNOT + const OPR_LEN + const OPR_MINUS + const OPR_NOT + const OPR_NOUNOPR + type UpvalDesc struct + InStack bool + Index uint8 + Kind uint8 + Name string + type Upvalue struct + type Value struct + func Bool(b bool) Value + func Float(f float64) Value + func Int(i int64) Value + func MkString(s string) Value + func NewGoFunc(name string, fn GoFunc) Value + func (a Value) RawEqual(b Value) bool + func (v Value) AsBool() bool + func (v Value) AsFloat() float64 + func (v Value) AsInt() int64 + func (v Value) AsTable() *Table + func (v Value) AsUserData() any + func (v Value) IsBool() bool + func (v Value) IsFalsy() bool + func (v Value) IsFloat() bool + func (v Value) IsFunction() bool + func (v Value) IsInt() bool + func (v Value) IsNil() bool + func (v Value) IsNumber() bool + func (v Value) IsString() bool + func (v Value) IsTable() bool + func (v Value) IsThread() bool + func (v Value) IsUserData() bool + func (v Value) NumUserValues() int + func (v Value) SetUserValue(n int, val Value) bool + func (v Value) Str() string + func (v Value) Type() int + func (v Value) UserMetatable() *Table + func (v Value) UserValue(n int) (val Value, ok bool) + type Var struct + Kind string + Name string + Raw Value + Value string + type ZIO struct