aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
blob: ec9d5ca75a51f161db6d8665c717242f50018d44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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.destroy();

    try server.start();

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

    server.run();
}