mach/examples/custom-renderer/main.zig
Stephen Gutekanst 0e12857154 examples/core: building without ECS
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-11-23 21:20:04 -07:00

22 lines
639 B
Zig

const std = @import("std");
const mach = @import("mach");
// The set of Mach modules our application may use.
const Modules = mach.Modules(.{
mach.Core,
@import("App.zig"),
@import("Renderer.zig"),
});
// TODO: move this to a mach "entrypoint" zig module which handles nuances like WASM requires.
pub fn main() !void {
const allocator = std.heap.c_allocator;
// The set of Mach modules our application may use.
var mods = Modules.init(allocator);
// TODO: enable mods.deinit(allocator); for allocator leak detection
// defer mods.deinit(allocator);
const app = mods.get(.app);
app.run(.main);
}