Skip to content

Conversation

@p00f
Copy link

@p00f p00f commented Dec 25, 2025

This allows using the zig bindings with system lua

@mischief
Copy link

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

@p00f
Copy link
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
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
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

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.

2 participants