summaryrefslogtreecommitdiff
path: root/build.zig.zon
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-26 13:27:46 -0300
committerGabriel Schneider <[email protected]>2026-08-27 09:47:39 -0300
commit11f380f6d7222f2cad93c2cdf13701ea1f903d47 (patch)
tree803194ee5853a6b4cda93f90a95e28d1f02e69ae /build.zig.zon
parentfbc194068687e49a8490c85c9f1257a2f2bb9079 (diff)
downloadpardes-11f380f6d7222f2cad93c2cdf13701ea1f903d47.tar.gz
pardes-11f380f6d7222f2cad93c2cdf13701ea1f903d47.zip
One core behind N frontends, the board's own runner moved in, and every board cap on one screen
## The wire is the effect stream, not a new protocol `pardes --detach` leaves a core running with no terminal; `pardes --attach` is a frontend that owns a terminal and a socket and nothing else. N frontends on one core all look at the same screen — `screen -x`, not N sessions. The codec (`src/detached/wire.zig`) carries exactly one `Event` or one `Host.VTable` call per message. That is not a coincidence and it is why there is no third vocabulary to keep in step: the core's IO seam was already a struct of function pointers with plain-data arguments, so a socket is a legal implementation of it. `nested.zig`'s socket could not be reused — it carries a builtin command line, and a command line cannot carry a frame. ARCHITECTURE-NEUTRAL on purpose, not as decoration. The frontend on the far end may be riscv32-freestanding on the ESP32-P4 while the core is x86_64 Linux, so every field is an explicit little-endian fixed width and no message is a blit of a native struct. A protocol that only works between two builds of the same compiler would have thrown away the one frontend that motivated it. ## The board comes in; its toolchain stays out `src/p4.zig` becomes `src/esp32p4.zig`, and the pardes half of `../05-zig-p4` — the vaxis-over- serial runner, the UART editor terminal, the keystroke rescue ring, the on-die test suite — moves into `src/esp32p4/`. `build.zig.zon` gains `.zig_p4 = .{ .path = "../05-zig-p4" }`, so `zig build -Dplatform=esp32p4 -Desp32p4-firmware` builds, flashes, monitors and self-tests the board from this repo's `build.zig`. The DIVISION is the point. What moved is what only pardes wants: the runner that drives a pardes core over a serial line. What stayed is everything a second project would also want — the HAL, the register/radio/oracle layers, the linker script, `_start`. `zig_p4` declares no dependencies of its own and its `build()` early-returns when it is not the root package, so this costs the package graph exactly zero packages and the editor's own builds nothing at all. ## limits.zig: nine forgettable places become one budget Nine `platform == .esp32p4` capacity tests lived in nine files. They were never nine decisions — they are ONE decision, how much memory this build may spend, taken nine times where no reader could see the total. `src/limits.zig` puts the whole budget on one screen with every cap named against what it is measured against, derived from two booleans. The payoff is testability on a machine that is not the board: the caps are ordinary comptime values, so a host build can be compiled against the board's numbers and the parking, eviction and clamping paths a 240 KiB core takes get exercised by the normal test suite instead of only over a UART. ## A bare `zig build` `zig build` with no arguments now builds the tty and GUI binaries and installs them into `~/.local/bin`, and says so once on stdout with the flag that overrides it. The old default built one binary into `zig-out` — a path nothing on a `PATH` ever looks at, which made "build it" and "use it" two different commands for no reason.
Diffstat (limited to 'build.zig.zon')
-rw-r--r--build.zig.zon18
1 files changed, 18 insertions, 0 deletions
diff --git a/build.zig.zon b/build.zig.zon
index 2d745db6..380a5d8a 100644
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -179,6 +179,24 @@
.url = "git+https://github.com/allyourcodebase/freetype#884fd2235e6ae1ec4306eda30b3259f20930ed2e",
.hash = "freetype-2.14.3-C3-WdXSKAAB-kHs4qgRoeoFnRkNQn6M_SSlUGZ6ywgBQ",
},
+ // The ESP32-P4 toolchain: the SoC/HAL/register layer, the generated
+ // linker script, the ELF->image builder, the ROM flasher and the
+ // interactive serial console. A PATH dependency, because it is a
+ // sibling checkout rather than something to pin a commit of, and
+ // because the firmware build reads an ESP-IDF checkout off this
+ // machine anyway.
+ //
+ // Safe to declare unconditionally, and that is measured rather than
+ // assumed. The failure this whole seam exists to avoid runs the OTHER
+ // way: nesting THIS package's ~30-package graph under that one broke
+ // every build there (std/Build.zig:2091's comptime branch quota over
+ // the enlarged dependency table, plus seven cached tree_sitter
+ // versions whose build.zig no longer compiles on 0.16) — see
+ // src/esp32p4.zig:8-15. In this direction there is nothing to enlarge:
+ // zig_p4 declares no dependencies at all, so it adds exactly zero
+ // packages here, and its `build()` early-returns when it is not the
+ // root package. Not lazy, because `build.zig` @imports it.
+ .zig_p4 = .{ .path = "../05-zig-p4" },
},
.minimum_zig_version = "0.16.0",
.paths = .{""},