summaryrefslogtreecommitdiff
path: root/src/wire.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/wire.zig')
-rw-r--r--src/wire.zig14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/wire.zig b/src/wire.zig
index 3dd08b29..9773d222 100644
--- a/src/wire.zig
+++ b/src/wire.zig
@@ -46,7 +46,7 @@ const family = switch (config.platform) {
/// What makes two cores step differently, hashed: a replica's hello carries
/// its own, and one of another build is refused. The protocol, the release
/// and commit, the platform and build options, every dependency's content
-/// hash (grammars, ghostty, Unicode), the walker codec's assumptions
+/// hash (grammars, the terminal emulator, Unicode), the walker codec's assumptions
/// (pointer width, byte order) and the tape's shape (tape.shape: what each
/// input and each answer of the host's is laid out as). Not the OS: a Linux
/// client of a FreeBSD session is the main case, and what differs there is
@@ -61,16 +61,18 @@ const family = switch (config.platform) {
/// their options and dependencies; -Dstamp-commit stamps one.
pub const semantics: u64 = blk: {
@setEvalBranchQuota(1_000_000);
+ // The two long ones (the dependencies, 2.5 KB, and the tape's shape,
+ // 11 KB) joined on, not formatted: formatting them at comptime was 5 %
+ // of a compile of the core.
break :blk std.hash.Wyhash.hash(0, std.fmt.comptimePrint(
- "wire {d}\npardes {s} {s}\n{s} grammars {} {} {} {} workspace_tag {} sources {}\nusize {d} {t}\n{s}\n{s}",
+ "wire {d}\npardes {s} {s}\n{s} grammars {} {} {} {} workspace_tag {} sources {}\nusize {d} {t}\n",
.{
version, config.version, config.commit orelse "unstamped",
family, config.syntax_highlighting, config.syntax_zig_grammar,
config.syntax_minimal_grammars, config.syntax_full_grammars, config.workspace_tag,
config.embed_sources, @sizeOf(usize), builtin.cpu.arch.endian(),
- config.deps, pardes.tape.shape,
},
- ));
+ ) ++ config.deps ++ "\n" ++ pardes.tape.shape);
};
/// EndOfStream: the message ends early; WriteFailed: no room for it.
@@ -88,7 +90,7 @@ pub const ClientTag = enum(u8) {
hello = 0x01,
bye = 0x02,
ping = 0x03,
- /// A replica's word about a terminal's state (src/screen_state.zig): the
+ /// A replica's word about a terminal's state (src/term/screen_state.zig): the
/// delta it holds, or rows it asks for. Opaque here.
screen_ack = 0x04,
/// What is the session's digest, in stream order (a replica checks
@@ -170,7 +172,7 @@ pub const ServerTag = enum(u8) {
/// A unit of the authority's stream (src/replica.zig): its origin, seq,
/// clocks and tape.
unit = 0x05,
- /// A terminal's delta, or rows asked for (src/screen_state.zig), applied
+ /// A terminal's delta, or rows asked for (src/term/screen_state.zig), applied
/// before the next unit. Opaque here.
screen = 0x06,
/// The session's digest (u64le), after every unit before it.