clean up lua stuff a bit and add mez.inspect

This commit is contained in:
Squibid 2025-12-10 21:03:03 -05:00
parent 1f2e333846
commit ec8b86cbb7
Signed by: squibid
GPG key ID: BECE5684D3C4005D
6 changed files with 698 additions and 309 deletions

View file

@ -37,6 +37,9 @@ pub fn create(client: *wl.Client, version: u32, id: u32) !void {
errdefer node.L.deinit();
node.L.openLibs();
Lua.openLibs(node.L);
Lua.loadRuntimeDir(node.L) catch |err| if (err == error.LuaRuntime) {
std.log.warn("{s}", .{try node.L.toString(-1)});
};
// TODO: replace stdout and stderr with buffers we can send to the clients
server.remote_lua_clients.prepend(&node.node);