From 19f7322100062b7c1adcde3376063ce6c1d8c72d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 30 Jul 2026 23:35:45 -0300 Subject: structure: backends into src/{tty,gui,lsp}, pane kinds and builtins into their own files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The core now lies FLAT at src/ and every subdirectory is one backend, so a file being in no directory at all is what says it is core. Pane-kind bodies leave pardes.zig for term_pane.zig / file_pane.zig / output_pane.zig, leaving it the layout, the event/effect machine and the generic render loop. Builtins are one struct each in builtins.zig, and the enum is folded out of the file's own declaration list at comptime — a zig file IS a struct, so the list of builtins and the builtins themselves are the same text. Adding one is writing a struct. Key paths deliberately stay one table for the config pass. Pure refactor: no golden moved. --- src/main.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index 61c0049e..436cf938 100644 --- a/src/main.zig +++ b/src/main.zig @@ -100,7 +100,7 @@ fn emscriptenMain(argc: c_int, argv: [*]?[*:0]u8) callconv(.c) c_int { // no argv in the browser: options stay default, state comes from the dump fn webMain() !void { - try @import("gui.zig").run(.{}); + try @import("gui/gui.zig").run(.{}); } fn nativeMain(init: std.process.Init) !void { @@ -153,8 +153,8 @@ fn nativeMain(init: std.process.Init) !void { } } switch (pardes.platform) { - .tty => try @import("tty.zig").run(init, opts), - .gui => try @import("gui.zig").run(init, opts), + .tty => try @import("tty/tty.zig").run(init, opts), + .gui => try @import("gui/gui.zig").run(init, opts), .web => unreachable, // web enters through webMain, never here } } -- cgit v1.3