aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
blob: 9c2bd79ee1f55ba269d40075b34679899729d518 (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(.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", .{});
}