diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-18 21:23:22 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-18 21:43:03 -0300 |
| commit | f9a3179542012ec1a700e2020ac9f616b819f972 (patch) | |
| tree | 73f4cb241876196331f7b28c9f773301bd341a7f /src/pardes.zig | |
| parent | a75956bb3443aa8aac778d2ff12c42f5ef99e0e9 (diff) | |
| download | pardes-f9a3179542012ec1a700e2020ac9f616b819f972.tar.gz pardes-f9a3179542012ec1a700e2020ac9f616b819f972.zip | |
dev: the frontends (dev/tui, dev/gui, the macOS app's Swift and resources in dev/macos), host_io, file_watch, fonts, the lsp client and Scip, Art, jump_trail, glide and vaxis_input into dev/ (the reorganisation's tree, step 2b): module `dev` (dev/root.zig) beside the core and the runtime, each naming the others; the window wired into it, sketchbook's devices imported as `sketchbook` (its `dev` would be ours); pardes.zig keeps its re-exports (host_io, file_watch, glide, fonts) so every caller reads as before; core-test and shell-test run the devices' test program too, so the same tests run (the ledger, tui and gui); nothing else changes: frames byte-identical, replicas and process-test the base's
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 061c0efc..c32ebb59 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4,7 +4,7 @@ pub const layout = @import("layout.zig"); /// `nextWake` answers in whole frames of it. pub const frame_ms: u32 = 16; pub const frame_ns: u64 = frame_ms * std.time.ns_per_ms; -pub const glide = @import("glide.zig"); +pub const glide = @import("dev").glide; pub const FrameStats = @import("FrameStats.zig"); pub const modal = @import("modal.zig"); pub const look = @import("look.zig"); @@ -91,11 +91,8 @@ pub const lsp = @import("lsp/lsp.zig"); /// What the runtime's files name of the core beside the above (9p_io). pub const ctl = @import("ninep/ctl.zig"); pub const edit_cmd = @import("edit_cmd.zig"); -/// The frontends, named by the product's root (runtime/main.zig). -pub const tui = @import("tui/tui.zig"); -pub const gui = @import("gui/gui.zig"); -pub const host_io = @import("host_io.zig"); -pub const file_watch = @import("file_watch.zig"); +pub const host_io = @import("dev").host_io; +pub const file_watch = @import("dev").file_watch; pub const Host = host_io.Host; pub const frameMark = tracy.frameMark; @@ -119,7 +116,7 @@ const Loc = Jump.Loc; pub const can_attach = platform == .tui or platform == .gui; -pub const fonts = if (font_picker) @import("fonts.zig") else struct {}; +pub const fonts = if (font_picker) @import("dev").fonts else struct {}; pub const Pane = panes.Pane; const Text = panes.Text; @@ -399,7 +396,6 @@ test { _ = @import("Core.zig"); _ = @import("Plumb.zig"); _ = @import("lsp/Ask.zig"); - _ = @import("lsp/lsp_client.zig"); _ = @import("Jump.zig"); _ = @import("keys.zig"); _ = @import("Effect.zig"); @@ -427,7 +423,6 @@ test { _ = @import("Pipe.zig"); _ = @import("colors.zig"); _ = @import("surface.zig"); - _ = @import("glide.zig"); _ = @import("body_layer.zig"); _ = @import("draw.zig"); _ = @import("dump.zig"); // its tests ran nowhere before @@ -443,11 +438,8 @@ test { _ = @import("Handover.zig"); _ = @import("walk.zig"); _ = @import("views.zig"); - // The frontends', which main.zig's test block collected: a shell's - // build (shell-test); the core without a terminal never compiled them. - if (comptime @import("term_options").terminal) { - if (comptime platform == .tui) _ = @import("tui/tui.zig"); - if (comptime platform == .gui) _ = @import("gui/gui.zig"); - _ = @import("vaxis_input.zig"); - } + // A window's build links the window's C (font.c over FreeType and + // HarfBuzz) into each of its programs, and their allocator (ui_malloc + // and the rest) is gui.zig's. + if (comptime @import("term_options").terminal and platform == .gui) _ = @import("dev").gui; } |
