omg lua in mez

This commit is contained in:
Squibid 2025-10-20 18:28:40 -04:00
parent f9e67a5681
commit ba4d403119
Signed by: squibid
GPG key ID: BECE5684D3C4005D
3 changed files with 14 additions and 0 deletions

View file

@ -1,6 +1,9 @@
const std = @import("std");
const wlr = @import("wlroots");
const zlua = @import("zlua");
const Lua = zlua.Lua;
const Server = @import("server.zig");
const gpa = std.heap.c_allocator;
@ -10,6 +13,11 @@ pub var server: Server = undefined;
pub fn main() !void {
wlr.log.init(.err, null);
var lua = try Lua.init(gpa);
defer lua.deinit();
lua.openLibs();
lua.doString("print('Hello from Lua embedded in Zig!')") catch {};
std.log.info("Starting mezzaluna", .{});
try server.init();