From faa68dd74eacd001e3421b8baef7fe6564fb4f2b Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 30 Oct 2026 17:00:14 -0300 Subject: 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 --- src/terminal.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/terminal.zig') diff --git a/src/terminal.zig b/src/terminal.zig index 63ce4f36..01a9777e 100644 --- a/src/terminal.zig +++ b/src/terminal.zig @@ -878,7 +878,8 @@ pub fn create(gpa: std.mem.Allocator, cols: u16, rows: u16) !*Pane { const pane = try createDoc(gpa, cols, rows); errdefer gpa.destroy(pane); if (comptime !enabled) return pane; - const own = if (pardes.tape.screenReplica()) emulator_gpa else gpa; + // A screen-state replica is a hosted build's: the web has no C heap. + const own = if (comptime pardes.hosted) (if (pardes.tape.screenReplica()) emulator_gpa else gpa) else gpa; const state = try own.create(State); errdefer own.destroy(state); state.gpa = own; -- cgit v1.3