To build all targets run
zig build
Name | Artifact |
---|---|
"lua" | The main lua library |
"lua_exe" | The lua interpreter |
"luac" | The lua bytecode compiler |
Name | Type | Description |
---|---|---|
release | bool | optimize for end users |
shared | bool | build as shared library |
use_readline | bool | readline support for linux |
To add to a zig project run:
zig fetch --save https://github.com/allyourcodebase/lua/archive/refs/tags/5.4.7.tar.gz
then add the following to your build.zig
const lua_dep = b.dependency("lua", .{
.target = target,
.release = optimize != .Debug,
});
const lua_lib = lua_dep.artifact(if (target.result.os.tag == .windows) "lua54" else "lua");