summaryrefslogtreecommitdiff
path: root/src/walk.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-30 17:00:14 -0300
committerGabriel Schneider <[email protected]>2026-10-30 17:40:51 -0300
commitfaa68dd74eacd001e3421b8baef7fe6564fb4f2b (patch)
tree9dd969ce5ce63368494971d2ce704d63af16b1b1 /src/walk.zig
parent5925ddbe1aa39a64b484b68a8ddb3649b3d180e4 (diff)
downloadpardes-faa68dd74eacd001e3421b8baef7fe6564fb4f2b.tar.gz
pardes-faa68dd74eacd001e3421b8baef7fe6564fb4f2b.zip
web: the build links no libc, so what is the C heap's is a hosted build's alone: terminal.create takes emulator_gpa (std.heap.c_allocator) only in a hosted build, as only one has a screen-state replica, and walk's blob lists (a replica client's, a join's) only with libc; `zig build web` failed on main at terminal.zig:601, and at walk.zig:115 behind it; it builds, and test/web-snapshots/touch.mjs passes (the driver's own CDP-deadline test fails as on main, untouched)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/walk.zig')
-rw-r--r--src/walk.zig8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/walk.zig b/src/walk.zig
index 88f62736..c5a6e7a2 100644
--- a/src/walk.zig
+++ b/src/walk.zig
@@ -111,12 +111,14 @@ fn hashBlob(comptime E: type, items: []const E, h: *Hasher) void {
const b = blob_words.get(addr) orelse break :kept null;
break :kept if (b.len == items.len) b.word else null;
} else null;
- if (blobs_out) |list| {
+ // The lists are the C heap's (a replica client's, a session's join),
+ // which a build with no libc (the web) has neither of.
+ if (comptime builtin.link_libc) if (blobs_out) |list| {
list.append(std.heap.c_allocator, std.mem.sliceAsBytes(items)) catch {};
break :word 0;
- }
+ };
if (!rehash) if (kept) |w| break :word w;
- if (E == u8) if (unhashed_out) |list| if (kept == null) {
+ if (comptime builtin.link_libc) if (E == u8) if (unhashed_out) |list| if (kept == null) {
list.append(std.heap.c_allocator, items) catch {};
break :word 0;
};