Releases: mxpv/luaz
Releases · mxpv/luaz
v0.6.0
Changed
- Updated Luau dependency from version 0.688 to 0.702
- Raw Luau C API is now re-exported from the library via the
cmodule - BREAKING: Replaced
Table.setClosure()withLua.Capture()for creating closures with upvalues. New API:table.set("name", Lua.Capture(upvalues, func))
Fixed
- registerUserData() now properly detects global name collisions when registering types from different modules with the same short name
Luau version: 0.702
v0.5.0
Added
- Enabled Ubuntu 22.04 ARM on CI.
Changed
- BREAKING: Updated Zig toolchain requirement to version 0.15.1 (#11)
setCallbacks()now explicitly clears unused callback pointers to null, fixing behavior when switching between different callback struct types- Updated Luau dependency from version 0.686 to 0.688
Luau version: 0.688
v0.4.0
Added
- Luau Buffer support for native binary data manipulation
- High-level
BufferAPI with direct memory access through[]u8slice - Integration with Zig's std.io patterns via
stream()method - Reference-counted memory management with automatic cleanup
- Full interoperability with Lua's buffer library
Lua.createBuffer(size)method for buffer creation- Buffer support in
Lua.Valueenum for runtime value handling - Stack operations for buffer values (
pushBuffer,toBuffer,isBuffer)
- High-level
- Configurable vector size build option (
-Dvector-size=3or4, default 4) Function.getCoverage()method for collecting code coverage data from Luau functions compiled with coverage enabled
Changed
- Build System: Switched from Git submodules to Zig package manager for Luau dependency, simplifying setup process
- Updated Luau dependency from version 0.684 to 0.686
- Enhanced State.zig documentation with detailed stack operation descriptions and Lua 5.1 manual references
Luau version: 0.686
v0.3.0
Added
- Luau StrBuf support for efficient string building with automatic memory management
- High-level
StrBufAPI withinit(),initSize(),addString(),addChar(), andadd()methods - Support for returning StrBuf from Zig functions with automatic pointer fixup
- Integration with table operations and closure system
- Handles both stack buffer (small strings) and dynamic allocation (large strings)
- High-level
- Variadic arguments support with
Varargsiterator for functions accepting variable number of argumentsVarargs.raiseError()method for throwing descriptive type validation errors
- BREAKING:
setClosureLua closures must useUpvalues(T)as first parameter - Canonical Zig iterator pattern for table iteration with
Table.iterator() - Metatable management APIs:
Lua.createMetaTable()for flexible metatable creation without global registrationTable.setMetaTable()andTable.getMetaTable()for metatable attachment and retrieval
Table.clear()method to remove all entries from a tableTable.clone()method to create a shallow copy of a tableFunction.clone()method to create a copy of a function with shared upvalue references- Debug API with breakpoints, stack inspection, and variable access:
Debugmodule with execution control:setSingleStep(),debugBreak(),debugTrace(),stackDepth()- Call stack inspection:
getInfo(),getArg(),getLocal()/setLocal(),getUpvalue()/setUpvalue() - Callback-based debugging with
setCallbacks()for breakpoint and step event handling - Function breakpoint support with
Function.setBreakpoint() - Support for debug compilation levels (0-2) for local variable and upvalue name inspection
- Thread-safe debugging with coroutine support and debug interruption handling
Changed
- BREAKING: Table iteration API now uses standard Zig iterator pattern (
iterator.next()) - Refactored
registerUserDataimplementation to use new metatable APIs internally - Renamed module files to follow Zig naming conventions:
src/state.zig→src/State.zigsrc/compile.zig→src/Compiler.zig- Updated all imports to use the module directly instead of accessing nested types
Removed
- BREAKING: Old manual table iteration method
Table.next()in favor of canonical iterator
v0.2.0
What's Changed
Added
- Sandboxing APIs for secure script execution
- Thread and coroutines support with full Luau threading capabilities
- Generic Lua Value type for runtime value handling
- Table iterator with automatic resource management
- Raw table operations for direct table access bypassing metamethods
- Low-level debug APIs for advanced debugging scenarios
- Metamethod support:
__indexand__newindexfor table access customization__tostringfor custom string conversion__lenfor custom length operations__concatfor concatenation operations- Math operation metamethods (
__add,__sub,__mul,__div, etc.) - Comparison metamethods (
__eq,__lt,__le)
- Table length operations with
Table.len()supporting full Lua semantics - Support for error returns in Lua functions
- Struct and array return type conversion
Changed
- Simplified resume API for streamlined coroutine management
- UserData improvements:
- Support for
*Luareceiver as first function parameter - UserData treated as
Reffor consistent reference handling - No longer requires at least 1 public function when registering
- Support for
- Arbitrary structs can be set as Lua tables
- Use
pcallinstead of directcallfor improved error safety - Exposed GC API for greater control over garbage collection
Documentation
- Updated guided tour with new features
- Enhanced README with additional examples
- Added test coverage reporting
Full Changelog: v0.1.0...v0.2.0
v0.1.0
What's Changed
Added
- Core Lua state management with
Statewrapper - High-level idiomatic Zig API through
Luastruct - Luau compiler integration for source-to-bytecode compilation
- Type system integration with automatic conversions:
- Zig functions wrapped as callable Lua functions
- Optional types (
?T) mapping to Lua nil values - Tuples converted to Lua tables with array semantics
- Support for vectors and primitive types
- Table operations:
- Create, set, and get table values
- Call table functions with automatic type handling
- Global environment access via
lua.globals()
- Reference system (
Ref) for holding Lua values across function calls - Function references for direct Lua function access
- UserData support:
- Register Zig structs as Lua userdata
- Automatic method binding with compile-time generation
- Light userdata support
- Custom allocator support through
Lua.init() - JIT code generation with
enable_codegen() - Standard library loading functions
- Debug utilities:
- Stack dumping with
dumpStack() - Custom assert handler support
- Stack dumping with
- Build system:
- Automatic discovery and compilation of Luau source files
- Multiple build targets (library, compiler, analyzer, docs)
- Code formatting checks
- Documentation generation
- Unit test suite with memory leak detection
- Continuous integration with coverage reporting
New Contributors
Full Changelog: https://github.com/mxpv/luaz/commits/v0.1.0