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 /runtime/main.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 'runtime/main.zig')
| -rw-r--r-- | runtime/main.zig | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/runtime/main.zig b/runtime/main.zig index 85b3e249..5d67ad60 100644 --- a/runtime/main.zig +++ b/runtime/main.zig @@ -1537,7 +1537,7 @@ fn nativeMain(std_init: std.process.Init) !void { opts.rows = 50; } const kind: daemon.Kind = if (pardes.platform == .gui) .gui else .tty; - var term: @import("core").tui.Term = if (detach != null) .detached else .open; + var term: @import("dev").tui.Term = if (detach != null) .detached else .open; var detached = detach != null; upgrade.remember(args); if (upgrade.resumed) |*rec| { @@ -1583,7 +1583,7 @@ fn nativeMain(std_init: std.process.Init) !void { defer daemon.quit(); errdefer daemon.tellStubExit(1); switch (pardes.platform) { - .tui => @import("core").tui.run(init, opts, term) catch |err| switch (err) { + .tui => @import("dev").tui.run(init, opts, term) catch |err| switch (err) { // No controlling terminal (a detached pty, a daemon): said, not // an error trace. error.NoDevice => { @@ -1592,7 +1592,7 @@ fn nativeMain(std_init: std.process.Init) !void { }, else => return err, }, - .gui => try @import("core").gui.run(init, opts, detached), + .gui => try @import("dev").gui.run(init, opts, detached), .macos => unreachable, } daemon.tellStubExit(0); @@ -1692,8 +1692,8 @@ fn commOf(io: std.Io, pid: []const u8, buf: *[64]u8) []const u8 { /// window's (gui.zig). fn clientOf(init: std.process.Init, opts: pardes.Options, path: []const u8, name: []const u8, far: bool) !void { switch (pardes.platform) { - .tui => try @import("core").tui.runClient(init, opts, path, name, far), - .gui => try @import("core").gui.runClient(init, opts, path, name, far), + .tui => try @import("dev").tui.runClient(init, opts, path, name, far), + .gui => try @import("dev").gui.runClient(init, opts, path, name, far), else => unreachable, } } @@ -1916,11 +1916,12 @@ test "tcgetattr writes nothing past a Zig termios" { test { _ = pardes.config.User; // The rest this block collected is collected where it lives now: the - // runtime's files by runtime/root.zig's test block, the core's (the - // frontends among them) by pardes.zig's. The window stays named: its - // C's allocator (ui_malloc and the rest) is gui.zig's. + // runtime's files by runtime/root.zig's test block, the core's by + // pardes.zig's, the devices' (the frontends) by dev/root.zig's. The + // window stays named: its C's allocator (ui_malloc and the rest) is + // gui.zig's. if (comptime pardes.platform == .tui) { - _ = @import("core").tui; + _ = @import("dev").tui; } - if (comptime pardes.platform == .gui) _ = @import("core").gui; + if (comptime pardes.platform == .gui) _ = @import("dev").gui; } |
