summaryrefslogtreecommitdiff
path: root/src/9p.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 11:21:15 -0300
committerGabriel Schneider <[email protected]>2026-11-05 12:41:12 -0300
commitcfd2b993feda1b3f7474225bb32db8cac8edc5ae (patch)
tree3248246c043fd1865e74adb979a9cb555f918cd6 /src/9p.zig
parentc0b2e5d9194ce35b9fbb58d8d6e18de66cb209a8 (diff)
downloadpardes-cfd2b993feda1b3f7474225bb32db8cac8edc5ae.tar.gz
pardes-cfd2b993feda1b3f7474225bb32db8cac8edc5ae.zip
targets: the ESP32-P4 board port goes (src/esp32p4*.zig and src/esp32p4/, -Dplatform=esp32p4 with its pinned riscv32 target, -Desp32p4-cols and -rows, the Peek, Poke, Hexdump and Gpio words and the Board behind them, the board's 9P engine options, the gpio_toggle host slot), and with it every guard and limit only the board needed: terminal_panes and terminal.enabled (ghostty is in every build), memory.limits' board branching (the desktop values stay), MAX_PANES 64 and MAX_COLS 16 fixed, the board's boot buffer and its embedded boot, the pager's and the terminal's emulator-less paths; tests: the board's GPIO, ring and Board ones go, the boot-OOM and transition-grid ones stay under their own names; the perf harness loses the board's fixture, so the Debug baselines of both frontends are recorded again (--only medium --reps 10)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/9p.zig')
-rw-r--r--src/9p.zig19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/9p.zig b/src/9p.zig
index 0979b66a..61715750 100644
--- a/src/9p.zig
+++ b/src/9p.zig
@@ -1,7 +1,7 @@
//! The editor's 9P surface. The wire protocol, the client, the transports
//! and the file-server engine (`cloud9.fs.Server`) live in cloud9; this
-//! module names the two engine configurations Pardes builds, the editor's
-//! and the board's, and re-exports what the transports and firmware use.
+//! module names the engine configuration Pardes builds, the editor's, and
+//! re-exports what the transports use.
const cloud9 = @import("cloud9");
pub const fs = cloud9.fs;
pub const Server = cloud9.fs.Server;
@@ -44,12 +44,7 @@ pub const msize: u32 = 65536;
pub const editor: cloud9.fs.Options = .{ .fid_capacity = max_fids, .name_capacity = 255, .park_data_max = msize - 23, .slot_capacity = max_held };
pub const max_held: usize = 128;
-/// The board's engine: the GPIO firmware's budget (src/esp32p4_9p.zig).
-pub const board: cloud9.fs.Options = .{ .fid_capacity = board_fids, .name_capacity = board_name_capacity };
-
pub const max_fids: usize = 256;
-pub const board_fids: usize = 32;
-pub const board_name_capacity: usize = 28;
const std = @import("std");
const testing = std.testing;
@@ -67,19 +62,11 @@ test "9p server: the editor's engine can park the largest write a client sends"
try testing.expect(editor.park_data_max >= client.maxWrite());
}
-test "9p server: board and native capacities size the actual fid storage" {
- const Board = Server(Stub, board);
+test "9p server: the editor's capacities size the actual fid storage" {
const Native = Server(Stub, editor);
- const BoardFids = @FieldType(Board, "fids");
const NativeFids = @FieldType(Native, "fids");
- try testing.expectEqual(32, @typeInfo(BoardFids).array.len);
try testing.expectEqual(256, @typeInfo(NativeFids).array.len);
- try testing.expectEqual(28, @sizeOf(@FieldType(Board.Fid, "name")));
try testing.expectEqual(255, @sizeOf(@FieldType(Native.Fid, "name")));
- try testing.expectEqual(32 * @sizeOf(Board.Fid), @sizeOf(BoardFids));
try testing.expectEqual(256 * @sizeOf(Native.Fid), @sizeOf(NativeFids));
- try testing.expect(@sizeOf(BoardFids) <= 3 * 1024);
- try testing.expect(@sizeOf(@FieldType(Board, "slots")) <= 8 * 1024);
- try testing.expect(3 * 4096 + @sizeOf(Board) <= 24 * 1024);
try testing.expect(min_msize >= msize_min);
}