2026-07-28 20:57:38 +02:00
|
|
|
//! ----------------------------------------------------
|
|
|
|
|
//! ----------------------------------------------------
|
|
|
|
|
|
2026-07-28 22:40:06 +02:00
|
|
|
//
|
|
|
|
|
// LIBS
|
|
|
|
|
//
|
|
|
|
|
|
2026-07-28 20:57:38 +02:00
|
|
|
const std = @import("std");
|
|
|
|
|
const App = @import("app");
|
|
|
|
|
|
2026-07-28 22:40:06 +02:00
|
|
|
//
|
|
|
|
|
// PLUGINS
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
const template = @import("plugins/template/root.zig");
|
|
|
|
|
const platform = @import("plugins/platform/root.zig");
|
|
|
|
|
const device = @import("plugins/device/root.zig");
|
|
|
|
|
const window = @import("plugins/window/root.zig");
|
|
|
|
|
|
2026-07-28 20:57:38 +02:00
|
|
|
/// ----------------------------------------------------
|
|
|
|
|
/// ----------------------------------------------------
|
|
|
|
|
pub fn main(init: std.process.Init) !void {
|
|
|
|
|
// --- APP ---
|
|
|
|
|
var app: App = .init(init.gpa);
|
|
|
|
|
defer app.deinit();
|
2026-07-28 22:40:06 +02:00
|
|
|
|
|
|
|
|
// --- ADD PLUGINS ---
|
|
|
|
|
try app.plugins.addMany(&.{
|
|
|
|
|
platform.plugin,
|
|
|
|
|
device.plugin,
|
|
|
|
|
window.plugin,
|
|
|
|
|
});
|
|
|
|
|
try app.plugins.build(&app);
|
|
|
|
|
|
|
|
|
|
{ // DEBUG
|
|
|
|
|
std.debug.print("\x1b[33m┏━\x1b[0m PLUGINS\n", .{});
|
|
|
|
|
for (app.plugins.data.items) |plugin| {
|
|
|
|
|
std.debug.print("\x1b[33m┃\x1b[0m {s:<12} {s}\n", .{ plugin.name, plugin.description });
|
|
|
|
|
}
|
|
|
|
|
std.debug.print("\x1b[33m┗━\x1b[0m\n", .{});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// --- LIFETIME ---
|
|
|
|
|
try app.schedules.run(App.stage.init, &app);
|
|
|
|
|
defer app.schedules.runReversed(App.stage.deinit, &app) catch unreachable;
|
2026-07-28 20:57:38 +02:00
|
|
|
}
|