aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
blob: 9b581b246c82e0f7ae71cc72f8bd18beaccbc449 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const std = @import("std");
const c = @import("c.zig");
const Log = @import("log.zig").Log;

const Server = @import("server.zig").Server;

pub fn main() !void {
    Log.init(Log.Debug);
    c.wlr_log_init(c.enum_wlr_log_importance.WLR_ERROR, null);

    Log.Info.log("Initializing server", .{});

    var server: Server = undefined;
    try server.init(std.heap.c_allocator);
    defer server.deinit();

    try server.start();

    Log.Info.log("Running server...", .{});

    server.run();

    Log.Info.log("Shutting down server", .{});
}