Guide
Task-oriented guides for using Luax. Pick a topic below to dive in.
Interop & APIs
Dart ↔ Lua Interop
The full protocol for calling Dart from Lua, Lua from Dart, and reading Lua tables and functions across the boundary.
Async / Await
Call async Dart functions from Lua using the
awaitkeyword, or suspend insidecoroutine.resumeAsync.Event System
Bidirectional EventEmitter bridging Dart and Lua callbacks — including one-shot listeners, async listeners, and security sandboxing.
Language features
Coroutines
Full Lua 5.3
coroutinelibrary —create,yield,resume,wrap, plus async-awareresumeAsync.Language Features
Luax's Lua 5.3+ extensions:
goto/::label::, pattern matching with%band%f, binary data packing, and function serialization.
Runtime
Garbage Collection
Incremental tri-color mark-and-sweep collector,
__gcfinalizers, weak tables, and thecollectgarbage()API.Parser & AST
Use
lua_parserto build static analysis tools, linters, and code transformers on top of the Luax parser.
Platforms
Web Platform
Running Luax in the browser via the platform abstraction layer — supported APIs, limitations, and workarounds.
Flutter Integration
The companion
flutter_luaxpackage: widget bindings,LuaxScriptLoader, and a complete integration example.
Internals
- Architecture — A deep-dive into the Luax VM: the compilation pipeline, the register-based execution model, state management, and the garbage collector.