mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-07 19:49:53 -05:00
load a runtime file where the prefix is determined at comptime
This commit is contained in:
parent
ba4d403119
commit
86a01bbcf2
4 changed files with 59 additions and 8 deletions
11
src/main.zig
11
src/main.zig
|
|
@ -1,25 +1,20 @@
|
|||
const std = @import("std");
|
||||
const wlr = @import("wlroots");
|
||||
|
||||
const zlua = @import("zlua");
|
||||
const Lua = zlua.Lua;
|
||||
|
||||
const Server = @import("server.zig");
|
||||
const Lua = @import("lua.zig");
|
||||
|
||||
const gpa = std.heap.c_allocator;
|
||||
|
||||
pub var server: Server = undefined;
|
||||
pub var lua: Lua = 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 lua.init();
|
||||
try server.init();
|
||||
defer server.deinit();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue