Skip to content

Conversation

@p00f
Copy link
Contributor

@p00f p00f commented Dec 25, 2025

This allows using the zig bindings with system lua

@mischief
Copy link
Contributor

can you add lua 5.5 support, which was just released?

@p00f
Copy link
Contributor Author

p00f commented Dec 25, 2025

Sorry, my distro doesn't have it yet so I can't test it, and ziglua itself doesn't support it yet either

const zlua = b.addModule("zlua", .{
const zlua = if (system) b.addModule("zlua", .{
.root_source_file = b.path("src/lib.zig"),
.target = target,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't cross compile when using system lua so this should be fine

.lua53 => zlua.linkSystemLibrary("lua5.3", .{ .preferred_link_mode = link_mode }),
.lua54 => zlua.linkSystemLibrary("lua5.4", .{ .preferred_link_mode = link_mode }),
.luajit => zlua.linkSystemLibrary("luajit", .{ .preferred_link_mode = link_mode }),
.luau => @panic("luau not supported for system lua"),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the luau package in my distro doesn't come with libraries or headers

@robbielyman robbielyman merged commit a3c23ef into natecraddock:main Jan 5, 2026
8 checks passed
@p00f
Copy link
Contributor Author

p00f commented Jan 6, 2026

@robbielyman can this be backported to a branch that works with zig 0.15?

robbielyman added a commit that referenced this pull request Jan 7, 2026
@robbielyman
Copy link
Collaborator

@p00f yup, just did in dca1800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants