diff options
| -rw-r--r-- | build.zig | 2 | ||||
| -rw-r--r-- | docs/typ/building.typ | 4 | ||||
| -rw-r--r-- | docs/web.md | 2 | ||||
| -rw-r--r-- | src/daemon.zig | 4 | ||||
| -rw-r--r-- | src/main.zig | 6 | ||||
| -rw-r--r-- | src/replica.zig | 6 | ||||
| -rw-r--r-- | src/wire.zig (renamed from src/detached/wire.zig) | 2 | ||||
| -rw-r--r-- | test/daemon.py | 2 |
8 files changed, 14 insertions, 14 deletions
@@ -15,7 +15,7 @@ else /// Every dependency the manifest pins, by its content hash: a grammar, /// ghostty or the Unicode tables steps a core differently, so they are part -/// of a replica's semantics hash (src/detached/wire.zig `semantics`). +/// of a replica's semantics hash (src/wire.zig `semantics`). const deps_text = blk: { var text: []const u8 = ""; for (@typeInfo(@TypeOf(zon.dependencies)).@"struct".field_names) |name| { diff --git a/docs/typ/building.typ b/docs/typ/building.typ index 78cdba7e..b4d7cb82 100644 --- a/docs/typ/building.typ +++ b/docs/typ/building.typ @@ -178,7 +178,7 @@ Code map: `src/panes.zig` and the pane kinds it names (`src/File.zig`, mounts and resolution) and `src/pardes.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/detached/wire.zig` the input +per-user daemon and a terminal's stub, `src/wire.zig` the input wire a remote client will speak, `src/lsp/` the language-server client; `test/` holds harnesses, goldens and helix cases, `build/` the snapshot suite's build step. @@ -225,7 +225,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/detached/wire.zig` is its +beside it that `ssh -L` can forward. `src/wire.zig` is its protocol (version 14): 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, diff --git a/docs/web.md b/docs/web.md index b9d03b13..26646a38 100644 --- a/docs/web.md +++ b/docs/web.md @@ -92,7 +92,7 @@ the browser can never call. same gate: both are `enabled = pardes.hosted` (`src/builtins.zig`, and `pardes.hosted` is `tty or gui or macos`), because a detached session is a unix socket and a page has none. Nothing in this shell speaks -`src/detached/wire.zig`, and `detach` is one of the null vtable methods +`src/wire.zig`, and `detach` is one of the null vtable methods below. `src/web.zig` fills in six methods of `Host.VTable` and leaves the rest null, diff --git a/src/daemon.zig b/src/daemon.zig index fff7bbe5..7d2ca9b4 100644 --- a/src/daemon.zig +++ b/src/daemon.zig @@ -19,14 +19,14 @@ //! //! A replica (docs/next-daemon.md, phase 5) comes in on a stream socket of //! its own, `pardes-replica.sock`, which `ssh -L` can forward: its hello -//! (detached/wire.zig) names a session, and once its build is the session's +//! (wire.zig) names a session, and once its build is the session's //! the connection is handed to that session, which it talks to from then on. const std = @import("std"); const builtin = @import("builtin"); const libc = std.c; const posix = std.posix; const ninep_io = @import("9p_io.zig"); -const wire = @import("detached/wire.zig"); +const wire = @import("wire.zig"); const upgrade = @import("upgrade.zig"); const log = std.log.scoped(.replica); diff --git a/src/main.zig b/src/main.zig index 9092e2f9..2b50273c 100644 --- a/src/main.zig +++ b/src/main.zig @@ -315,11 +315,11 @@ fn badArgs(io: std.Io, comptime fmt: []const u8, args: anytype) noreturn { } /// The second line is what a replica's build must share with its session's -/// (detached/wire.zig `semantics`). +/// (wire.zig `semantics`). const version_text = (if (pardes.commit) |c| "pardes " ++ pardes.version ++ " (" ++ c ++ ")\n" else - "pardes " ++ pardes.version ++ "\n") ++ std.fmt.comptimePrint("semantics {x:0>16}\n", .{@import("detached/wire.zig").semantics}); + "pardes " ++ pardes.version ++ "\n") ++ std.fmt.comptimePrint("semantics {x:0>16}\n", .{@import("wire.zig").semantics}); const nested_text = \\pardes: this shell is already inside pardes, and a pardes inside a pardes @@ -1176,7 +1176,7 @@ test { _ = @import("memory.zig"); _ = @import("locations.zig"); _ = @import("fs.zig"); - _ = @import("detached/wire.zig"); + _ = @import("wire.zig"); _ = @import("ShaderBuild.zig"); _ = @import("vaxis_input.zig"); _ = @import("daemon.zig"); diff --git a/src/replica.zig b/src/replica.zig index e567587c..633080e7 100644 --- a/src/replica.zig +++ b/src/replica.zig @@ -18,7 +18,7 @@ //! and the comparison catches a guess the authority did not share. //! //! No transport: messages are bytes in and out. A client's input is its -//! id, a sequence number and the event as detached/wire.zig frames it; a +//! id, a sequence number and the event as wire.zig frames it; a //! unit is the input's origin (0 for the authority's own: a pty's output, a //! tick), its sequence number and the authority's tape of it. const std = @import("std"); @@ -27,7 +27,7 @@ const pardes = @import("pardes.zig"); const tape = @import("tape.zig"); const rollback = @import("rollback.zig"); const walk = @import("walk.zig"); -const wire = @import("detached/wire.zig"); +const wire = @import("wire.zig"); const screen_state = @import("screen_state.zig"); const c_heap = @import("c_heap"); const terminal = pardes.panes.terminal; @@ -1338,7 +1338,7 @@ pub const Framer = struct { f.z = null; } - /// Framed messages off `fd` (detached/wire.zig) handed to `take` until + /// Framed messages off `fd` (wire.zig) handed to `take` until /// the stream ends, `take` says stop, or a message is malformed. An /// envelope's are handed on as if they had come bare. fn run(fr: *Framer, gpa: Allocator, fd: c_int, ctx: anytype, comptime take: fn (@TypeOf(ctx), u8, []const u8) bool) void { diff --git a/src/detached/wire.zig b/src/wire.zig index 9d1abee5..d572d469 100644 --- a/src/detached/wire.zig +++ b/src/wire.zig @@ -6,7 +6,7 @@ //! them, went with phase 3. const std = @import("std"); const builtin = @import("builtin"); -const pardes = @import("../pardes.zig"); +const pardes = @import("pardes.zig"); const config = @import("pardes_config"); /// 19: a client joining again names the view it had in its hello, and a diff --git a/test/daemon.py b/test/daemon.py index f3c927ad..52e0bccd 100644 --- a/test/daemon.py +++ b/test/daemon.py @@ -205,7 +205,7 @@ def semantics(binary): class Replica: - """A replica's connection (src/detached/wire.zig): length-prefixed + """A replica's connection (src/wire.zig): length-prefixed messages, a tag byte and a little-endian u32 length. It is a near client: its first word after the hello says so.""" WIRE = 19 |
