mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-08 04:57:32 -04:00
omg lua in mez
This commit is contained in:
parent
f9e67a5681
commit
ba4d403119
3 changed files with 14 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue