diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-29 19:09:26 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-29 21:13:33 -0300 |
| commit | 2eb8860b2ca05c426f3962661441aaee13d3be44 (patch) | |
| tree | 8d363280576cc86db7209ef37c6210a0d5b75c8e /src/tape.zig | |
| parent | e4cfd57bc41c5740e3a823a8f05d70d3e87b68ca (diff) | |
| download | pardes-2eb8860b2ca05c426f3962661441aaee13d3be44.tar.gz pardes-2eb8860b2ca05c426f3962661441aaee13d3be44.zip | |
web: the browser shell builds again and loads a dump of a native build: a theme by its name, a field compiled out passed over, no disk asked; touch.dump replaces the hand-written ZON fixture
Fixed for wasm32-freestanding: counts as usize, no threads, stb_image, tape or
host stat there. touch.mjs follows the renderer's 13 tag-layer fields, helix's
retuned colours and the tag column.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/tape.zig')
| -rw-r--r-- | src/tape.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tape.zig b/src/tape.zig index d4fb7756..84bdce29 100644 --- a/src/tape.zig +++ b/src/tape.zig @@ -163,6 +163,7 @@ pub const Tape = struct { } fn flush(t: *Tape) void { + if (comptime !pardes.hosted) return; // A tape in memory (a replica's, an authority's stream) is taken // by whoever holds it. if (t.fd < 0) return; @@ -710,6 +711,8 @@ pub fn value(comptime s: Site, comptime f: anytype, args: anytype) @typeInfo(@Ty fn call(comptime s: Site, a: ?std.mem.Allocator, comptime f: anytype, args: anytype, comptime yields: bool) @typeInfo(@TypeOf(f)).@"fn".return_type.? { const R = @typeInfo(@TypeOf(f)).@"fn".return_type.?; + // No tape where there is no host to record or replay one. + if (comptime !pardes.hosted) return if (yields) out(f, args) else @call(.auto, f, args); const t = on orelse return if (yields) out(f, args) else @call(.auto, f, args); const id: u16 = @as(u16, host_fns.len) + @backingInt(s); if (t.replay) { @@ -928,6 +931,7 @@ pub fn digestOf(p: *const Pardes) u64 { /// PARDES_RECORD set: the tape is written from the session's first call. pub fn startFromEnv() void { + if (comptime !pardes.hosted) return; if (on != null) return; const prefix = std.mem.span(libc.getenv("PARDES_RECORD") orelse return); if (prefix.len == 0) return; |
