summaryrefslogtreecommitdiff
path: root/docs/typ/building.typ
diff options
context:
space:
mode:
Diffstat (limited to 'docs/typ/building.typ')
-rw-r--r--docs/typ/building.typ40
1 files changed, 20 insertions, 20 deletions
diff --git a/docs/typ/building.typ b/docs/typ/building.typ
index 9026aa4f..5273298e 100644
--- a/docs/typ/building.typ
+++ b/docs/typ/building.typ
@@ -76,7 +76,7 @@ must share with its session; `pardes --help` lists every flag.
== As a library <library>
A Zig package that depends on pardes is given one module and nothing of
-the editor: `pardes-syntax` (`src/lib_syntax.zig`), for a program that
+the editor: `pardes-syntax` (`core/lib_syntax.zig`), for a program that
draws source text itself and wants it parsed and coloured as pardes has
it.
@@ -118,7 +118,7 @@ package, and `zig build lib-test` builds and runs it.
=== The editor
-`pardes-editor` (`src/lib_editor.zig`) is the text pane as a library:
+`pardes-editor` (`core/lib_editor.zig`) is the text pane as a library:
helix's keys on a text kept in memory, no files, commands, builtins,
prompts or views. A package asks for it, and is then given uucode, mvzr
and vaxis's grapheme width besides; one that does not fetches nothing more.
@@ -161,7 +161,7 @@ zig build core-test core tests on the core without a terminal (no ghostty
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 term-test the terminal module's own tests (core/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
@@ -209,7 +209,7 @@ zig build cheatsheet render the cheatsheet PDF (needs typst)
[--replay-with=<pardes-gui>]` records and replays the tty cases' real
sessions, their shells' and files' answers on the tape.
- The tutor's practice blocks (`# keys:`, `# before`, `# after` in
- `src/tutor.txt`) are typed by hand; nothing runs them. What pins that
+ `core/tutor.txt`) are typed by hand; nothing runs them. What pins that
behaviour is `hxdiff`, which replays `test/hxcases` against goldens
recorded from a real helix, and its `--parity`, which runs each case in a
file pane and in a shell and demands they agree.
@@ -278,12 +278,12 @@ 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
+- The terminal is a module of its own, `term` (`core/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).
+ reaches it through one table of plain-data entries (`abi/term.zig`,
+ through `core/Term.zig`), chosen at compile time. The records both name
+ (cells, colours, keys) are `plain` (`abi/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,
@@ -291,13 +291,13 @@ effects such as spawning processes.
allocator is a DebugAllocator over its arena's reserved region, thread
safe, its checks in Debug builds only.
-Code map: `src/panes.zig` and the pane kinds it names (`src/File.zig`,
-`src/Terminal.zig`, ...), `src/layout.zig`, `src/fs.zig` (host access,
-mounts and resolution) and `src/pardes.zig` (input), with one file per
+Code map: `core/panes.zig` and the pane kinds it names (`core/File.zig`,
+`src/Terminal.zig`, ...), `core/layout.zig`, `core/fs.zig` (host access,
+mounts and resolution) and `core/root.zig` (input), with one file per
thing beside them (`edit.zig`, `normal.zig`, `look.zig`, `exec.zig`,
-`mouse.zig`, ...). `src/ninep/` is the control tree, `src/daemon.zig` the
-per-user daemon and a terminal's stub, `src/wire.zig` the input
-wire a remote client will speak, `src/lsp/` the
+`mouse.zig`, ...). `core/ninep/` is the control tree, `runtime/daemon.zig` the
+per-user daemon and a terminal's stub, `abi/wire.zig` the input
+wire a remote client will speak, `core/lsp/` the
language-server client; `test/` holds harnesses, goldens and helix cases,
`build/` the process tests' build steps.
@@ -318,7 +318,7 @@ edit) the file's revision reject a stale reply. A process that never calls
== The daemon and detached sessions
-One `pardes --daemon` per user (`src/daemon.zig`) listens on
+One `pardes --daemon` per user (`runtime/daemon.zig`) listens on
`pardes-daemon.sock` in the runtime directory, its `.lock` flocked for its
life; the first session that finds none starts it (a double fork and an
exec) and it exits a second after it holds nothing. It is nobody's parent:
@@ -343,7 +343,7 @@ own process, ended by its hangup.
A replica (a client running its own copy of the core, phase 5 of
`docs/next-daemon.md`) connects to `pardes-replica.sock`, a stream socket
-beside it that `ssh -L` can forward. `src/wire.zig` is its
+beside it that `ssh -L` can forward. `abi/wire.zig` is its
protocol (its `version`): fixed-width little-endian fields, a 5-byte header
(tag, then a u32 length), the hello, a ping, the input events. The hello
names a session and carries the client's semantics hash (the protocol,
@@ -354,9 +354,9 @@ nobody has, in words, and hands an accepted connection to its session
(`SCM_RIGHTS`), which welcomes it and from then on is the one it talks
to: the session sends the dump the client loads, then each step's tape and
its terminals' screens, and the client sends its inputs
-(`src/replica.zig`; #doc("running") draws it).
+(`core/replica.zig`; #doc("running") draws it).
-#word("Upgrade") (`src/upgrade.zig`) execs the path the session was started
+#word("Upgrade") (`runtime/upgrade.zig`) execs the path the session was started
from, at a step boundary, after asking it `--version`: the session's dump
is committed to the state file as `upgrade-<pid>` (the build before wrote
`pardes-upgrade-<pid>.dump`, which this one still reads, for one release), and its pty masters,
@@ -383,10 +383,10 @@ shared code.
- The engine (`fs.Server`) owns fids, permissions, directory reads,
flushes and what a hangup releases; it allocates nothing and makes no OS
- calls. The control tree in `src/ninep/` is its backend: `tree.zig`
+ calls. The control tree in `core/ninep/` is its backend: `tree.zig`
(nodes, dispatch), `pane.zig`, `ctl.zig`, `cols.zig`, `addr.zig`,
`pty.zig`, `events.zig` (event and log), `screen.zig`, `sources.zig`.
- `src/9p.zig` names the editor's engine settings: msize 65536, 256 fids,
+ `runtime/9p.zig` names the editor's engine settings: msize 65536, 256 fids,
128 held reads a connection, names up to 255 bytes.
- A read, write, open, clunk, remove or truncating wstat can park; a walk,
attach, stat, create or rename cannot. Every Rread is clamped to the