From b65048ac19f9f47b6faa21d1a9f3d06ba3ff1a95 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 17 Nov 2026 04:20:55 -0300 Subject: docs: the terminal out of the core, as built: docs/next-terminal.md gains Phase 1 as built (the ops a compile-time constant and why, the table, Term.State a struct around the handle and the dump's type name, echo back in the core, the draw group as plain data with the diff colours beside it, the no-terminal core with no boot message and why, the test split by its counts), its not-verified list loses what is now known; building.typ says what core-test, shell-test and term-test build and run, and the term and plain modules; the changelog's entry says the terminal is a module of its own and what core-test and shell-test are --- docs/typ/building.typ | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'docs/typ/building.typ') diff --git a/docs/typ/building.typ b/docs/typ/building.typ index 6bf7dfce..543acfa5 100644 --- a/docs/typ/building.typ +++ b/docs/typ/building.typ @@ -121,8 +121,12 @@ package, and `zig build lib-test` builds and runs it. ``` zig build unit-test module and shell unit tests (the perf gate runs with it) zig build test-build compile the unit-test programs without running them -zig build core-test core tests without native shell tests -zig build shell-test the native shell's own unit tests, without the perf gate +zig build core-test core tests on the core without a terminal (no ghostty, + no C++): a shell boot is a scratch pane, and a test + that needs a terminal skips; the one to iterate on +zig build shell-test the same tests and the native shell's, with the terminal, + without the perf gate +zig build term-test the terminal module's own tests (src/term/) zig build pane-test pane, output and namespace integration tests zig build kitty-test kitty graphics conformance of terminal panes, at the core zig build kitty-harness kitty graphics through a pane end to end (a fake kitty @@ -238,6 +242,14 @@ effects such as spawning processes. decides who serves it. - The root module is chosen by platform: `main.zig` (tui, gui), `macos.zig`. The macOS shell is a library whose host owns `main()`. +- The terminal is a module of its own, `term` (`src/term/`): the + emulator (ghostty-vt), kitty images (wuffs, zstbi), the pager's parse + and the replicas' screen state. It never imports the core; the core + reaches it through one table of plain-data entries (`src/plain/term.zig`, + through `src/Term.zig`), chosen at compile time. The records both name + (cells, colours, keys) are `plain` (`src/plain/plain.zig`, std only). + Every product is built with the terminal; core-test's core is built + without it, so its compile names no ghostty, wuffs, zstbi or C++. - `memory.limits` is the one home for the core's capacities (selections, the tag's bytes, undo, the arenas' regions). Each core allocator is a DebugAllocator over its arena's reserved region, thread -- cgit v1.3