From ddb2554fff073eed0b73a43825b2c007c895bc4d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 30 Oct 2026 05:58:13 -0300 Subject: replica: a far client's content cache and zstd: the session lists its join's blobs by BLAKE3 hash first (wire 16 `blobs`), the client finds each in the core it leaves or on disk ($XDG_CACHE_HOME/pardes/blobs, hashed again on load, a bad file a miss, the least recently used evicted past 1 GiB) and asks for the rest (`want`), and everything after the welcome goes in zstd envelopes (level 6 over 8 MiB for the join, an undo snapshot being a near copy of its text, then level 3), so `ssh -C` leaves the default command; a far client (through ssh, or PARDES_REPLICA_FAR) keeps what it was sent and, at its end, what it made; a hangup ends a remote client the normal way; through the box a client holding the blobs is drawn in 2.4 s where main took 7.0 to 11.9, and a first join of a session with undo in 7.1 s where main took 11.9; libzstd 1.5.7 vendored, its allocations on c_heap, a second copy refused by shared-libs-check; tests for the cache's verify-on-load, its eviction and a far join's blobs sent once; test/daemon.py's far clients Co-Authored-By: Claude Opus 5.5 --- build.zig.zon | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'build.zig.zon') diff --git a/build.zig.zon b/build.zig.zon index b7313981..09860fb1 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -191,6 +191,12 @@ .hash = "N-V-__8AAG02ugUcWec-Ndp-i7JTsJ0dgF8nnJRUInkGLG7G", .lazy = true, }, + // zstd for a far replica client's stream (src/replica.zig): the + // upstream release tarball, its lib/ compiled by build.zig. + .zstd = .{ + .url = "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz", + .hash = "N-V-__8AAPZ7fwBg4JoCzM_0o2A8wxH2hsUUeiU1iuZv53L5", + }, }, .minimum_zig_version = "0.17.0", .paths = .{""}, -- cgit v1.3