luai

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(state *lua.LState, v any) (lua.LValue, error)

func Unmarshal

func Unmarshal(value lua.LValue, v any) error

Types

type LuaVM

type LuaVM struct {
	Instance *lua.LState
}

func NewLuaVM

func NewLuaVM() *LuaVM

func (*LuaVM) CallFunction

func (vm *LuaVM) CallFunction(function lua.LValue, args ...lua.LValue) error

func (*LuaVM) Close

func (vm *LuaVM) Close()

func (*LuaVM) GetTableString

func (vm *LuaVM) GetTableString(table *lua.LTable, key string) string

func (*LuaVM) LimitPackagePath added in v0.3.0

func (vm *LuaVM) LimitPackagePath(packagePaths ...string)

LimitPackagePath limits the package path of the Lua VM.

func (*LuaVM) Prepare

func (vm *LuaVM) Prepare(options *PrepareOptions) error

func (*LuaVM) ReturnedValue

func (vm *LuaVM) ReturnedValue() *lua.LTable

type PrepareOptions

type PrepareOptions struct {
	Config *config.Config
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL