From 1551e409c31992437cb2fa864f576d45c8433801 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 16 Aug 2026 15:49:12 -0300 Subject: big slow change: prebuilt shaders (SPIR-V/Metal), core gui reflow, docs, web + snapshot refresh --- src/main.zig | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index 4a067406..48022db5 100644 --- a/src/main.zig +++ b/src/main.zig @@ -200,7 +200,7 @@ fn nativeMain(init: std.process.Init) !void { } } } - // Native shells opt into the user config; the sans-IO core and web keep + // Native shells opt into the user config; direct core callers and web keep // Options' null default. Read it before entering either frontend so every // builtin has run before that frontend can render its first frame. const found = @import("user_config.zig").load(init.io, arena, init.environ_map); @@ -232,14 +232,20 @@ fn parseCtrlKey(raw: []const u8) ?u21 { } // The shells are imported inside main(), which a test build never analyses — -// so their inline tests need naming here to exist at all. gui.zig only -// compiles when it IS the shell (it @cImports SDL), hence the comptime gate; -// under -Dplatform=tty this block analyses to nothing. Naming a file gets THAT -// file's tests and no further: fonts.zig is imported by gui.zig, builtins.zig -// and the macOS host, and still needs its own line here. +// so their inline tests need naming here to exist at all. Each shell only +// compiles when selected (GUI @cImports SDL; TTY imports vaxis), hence the +// comptime gates. Naming a file gets THAT file's tests and no further: +// fonts.zig is imported by gui.zig, builtins.zig and the macOS host, and still +// needs its own line here. test { _ = @import("user_config.zig"); _ = @import("allocators.zig"); + if (comptime pardes.platform == .tty) { + _ = @import("tty/tty.zig"); + // tty.zig calls the compositor only from its runtime loop, so merely + // naming the shell does not make Zig analyse the compositor's tests. + _ = @import("tty/panel_compositor.zig"); + } if (comptime pardes.platform == .gui) _ = @import("gui/gui.zig"); if (comptime pardes.font_picker) _ = @import("fonts.zig"); } -- cgit v1.3