mach/examples/text/main.zig
2024-07-13 09:06:35 -07:00

20 lines
554 B
Zig

const std = @import("std");
const mach = @import("mach");
// The global list of Mach modules registered for use in our application.
pub const modules = .{
mach.Core,
mach.gfx.text_modules,
@import("App.zig"),
};
// TODO(important): use standard entrypoint instead
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
const allocator = gpa.allocator();
var app = try mach.App.init(allocator, .app);
defer app.deinit(allocator);
try app.run(.{ .allocator = allocator });
}