Skip to content

lua

Luax

A pure-Dart implementation of the Lua 5.3 virtual machine.

homepage: https://github.com/NaivG/Luax

Classes

ClassDescription
HookContextContext for a debug hook.
LuaAuxLib
LuaBasicAPI
LuaCoroutineLibAbstract interface for Lua coroutine operations. Implements the coroutine library functionality.
LuaDebugAbstract interface for Lua debug operations.
LuaEventAPIAbstract interface for the bidirectional event system.
LuaStateAbstract base class for Lua state operations. Combines basic API, auxiliary library, coroutine support, and debug features.
NativePlatformServicesNative implementation of platform services using dart:io.
PlatformServicesAbstract interface for platform-specific services.
Userdata<T>Fix #36: Add per-instance metatable support to Userdata Previously, all Userdata objects shared the same metatable via registry key, which caused setting metatable on one userdata to affect all userdata.

Exceptions

ExceptionDescription
LuaYieldExceptionException thrown when a coroutine yields. This is used internally to implement coroutine.yield().

Enums

EnumDescription
ArithOparithmetic functions
CmpOpcomparison functions
LuaTypebasic ypes
ThreadStatus

Functions

FunctionDescription
createPlatformServicesCreates the native platform services instance.
luaUpvalueIndexReturns the pseudo-index for an upvalue at the given index (1-based). Use this in Dart closures to access upvalues pushed before the closure.

Constants

Constant
luaMaxInteger
luaMaxStack
luaMinInteger
luaMinStack
luaMultret
luaRegistryIndex
luaRidxGlobals

Typedefs

TypedefDescription
DartFunctionSynchronous Dart function that can be called from Lua. Returns the number of values pushed onto the Lua stack.
DartFunctionAsyncAsynchronous Dart function that can be called from Lua. Returns a Future that resolves to the number of values pushed onto the Lua stack.
EventCallbackSynchronous Dart event callback.
EventCallbackAsyncAsynchronous Dart event callback.