From c1990b3e6e196ad41379aa432bf3ccca8a65d9f0 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 20 Sep 2026 00:36:50 -0300 Subject: Flatten the 9P control tree and move it out of fs.zig The served tree loses the self/ level: /index /ctl /new /log /screen /listeners /pane//... /os, with /src only in -Dembed-sources=true builds (default off, on for esp32p4). ctl speaks the editor's own language with two lowercase verbs, look TEXT and exec TEXT, plus acme's addr verbs; the new/ factory directory becomes one clone file; cons is gone (exec Msg); name and sel are files; stats report real lengths, modes and mtimes; /log streams pane new/del/rename/save events. The tree code lives in src/ninep/ (tree, pane, ctl, addr, pty, events, screen, sources); fs.zig keeps host access, mounts, resolution and find/grep. Same engine and transports. README (fs-help.txt) and docs rewritten; tests updated and extended. Co-Authored-By: Claude Fable 5.1 --- src/memory.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/memory.zig') diff --git a/src/memory.zig b/src/memory.zig index 60ec1bb6..f30e4392 100644 --- a/src/memory.zig +++ b/src/memory.zig @@ -19,7 +19,8 @@ pub const limits = struct { pub const message_log = if (board) 16 else 128; pub const max_tag_tail: usize = if (board) 512 else 4096; pub const host_path_cap: usize = if (board) 0 else 4095; - pub const embedded_sources = !board; + /// -Dembed-sources: the editor serves its own sources under /src. + pub const embedded_sources = config.embed_sources; pub const hexdump_row_bytes: u32 = if (board) 8 else 16; pub const arena = struct { @@ -138,7 +139,7 @@ test "memory limits preserve desktop capacities" { try std.testing.expectEqual(128, limits.message_log); try std.testing.expectEqual(@as(usize, 4096), limits.max_tag_tail); try std.testing.expectEqual(@as(usize, 4095), limits.host_path_cap); - try std.testing.expect(limits.embedded_sources); + try std.testing.expectEqual(config.embed_sources, limits.embedded_sources); try std.testing.expectEqual(@as(u32, 16), limits.hexdump_row_bytes); try std.testing.expectEqual(32 * MiB, limits.arena.pardes); try std.testing.expectEqual(16 * MiB, limits.arena.frame); -- cgit v1.3