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. --- build.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index 87df6727..c11ccccd 100644 --- a/build.zig +++ b/build.zig @@ -122,7 +122,7 @@ pub fn build(b: *std.Build) void { if (target.result.os.tag == .freebsd or target.result.os.tag == .netbsd or target.result.os.tag == .openbsd) root_mod.linkSystemLibrary("util", .{}); - // The language backend (src/lsp_zls.zig) links ZLS as a MODULE — no zls + // The language backend (src/lsp/lsp_zls.zig) links ZLS as a MODULE — no zls // binary, no JSON-RPC, no protocol. Everything except the browser gets it; // emscripten does not, because the web shell has no threads and no-ops the // lsp effect anyway, so paying to compile an analyser it can never call @@ -639,7 +639,7 @@ pub fn build(b: *std.Build) void { const crt_test = b.addTest(.{ .root_module = b.createModule(.{ .target = target, .optimize = optimize, - .root_source_file = b.path("src/crt.zig"), + .root_source_file = b.path("src/gui/crt.zig"), }) }); unit_step.dependOn(&b.addRunArtifact(crt_test).step); // deck.zig is pure std too; replay.zig drives it with slices of real @@ -652,7 +652,7 @@ pub fn build(b: *std.Build) void { deck_test.root_module.addImport("deck", b.createModule(.{ .target = target, .optimize = optimize, - .root_source_file = b.path("src/deck.zig"), + .root_source_file = b.path("src/gui/deck.zig"), })); unit_step.dependOn(&b.addRunArtifact(deck_test).step); } -- cgit v1.3