Research: Rust client core compiled to WebAssembly within D188 budgets (D238) #177

Open
opened 2026-10-12 04:13:29 +00:00 by kayg · 7 comments
Owner

Spike before the full Rust client core (D238, Q29). Measure, do not decide. Job: research-wasm-core.

Spike before the full Rust client core (D238, Q29). Measure, do not decide. Job: research-wasm-core.
Author
Owner

Starting research on branch research-wasm-core, based on origin/dev at f2810b94f9c97a00e5ff5faf6e0f03937be0953f. Issue #177 has no prior comments or linked parent.

Starting research on branch `research-wasm-core`, based on `origin/dev` at `f2810b94f9c97a00e5ff5faf6e0f03937be0953f`. Issue #177 has no prior comments or linked parent.
Author
Owner

Finding: the Mac VM is reachable, but /tmp/mac-bench.lock already exists (checked 2026-10-12 04:20 UTC), so I did not benchmark there or remove the lock. I will retry after local measurements.

Finding: the Mac VM is reachable, but `/tmp/mac-bench.lock` already exists (checked 2026-10-12 04:20 UTC), so I did not benchmark there or remove the lock. I will retry after local measurements.
Author
Owner

Finding: apps/tracer/src/terminal.ts allocates 1 MiB each for input/output queues plus a 16 KiB input scratch per terminal (lines 13–16, 221–223): 2,113,536 B/session and 105,676,800 B (100.78 MiB) at 50 sessions, before renderer memory. The WASM session model will preserve these bounded queues so its memory comparison is apples-to-apples.

Finding: `apps/tracer/src/terminal.ts` allocates 1 MiB each for input/output queues plus a 16 KiB input scratch per terminal (lines 13–16, 221–223): 2,113,536 B/session and 105,676,800 B (100.78 MiB) at 50 sessions, before renderer memory. The WASM session model will preserve these bounded queues so its memory comparison is apples-to-apples.
Author
Owner

Completed scratch slice: it reuses crates/infraternal-protocol, models the current 1 MiB input/output queues and 16 KiB scratch per session, output/ack cursors, resume credentials, and bounded reconnect delay. Two scratch state checks pass. First unoptimized wasm32-unknown-unknown artifact: 30,182 B. Next: binding and browser timing candidates.

Completed scratch slice: it reuses `crates/infraternal-protocol`, models the current 1 MiB input/output queues and 16 KiB scratch per session, output/ack cursors, resume credentials, and bounded reconnect delay. Two scratch state checks pass. First unoptimized `wasm32-unknown-unknown` artifact: 30,182 B. Next: binding and browser timing candidates.
Author
Owner

Finding: benchmark host is infraternal-dev (8 vCPU); setup measured load average 94.53 / 83.94 / 80.36 with 93 runnable tasks. I will record load at each browser run and treat p99 as host-load-sensitive.

Finding: benchmark host is `infraternal-dev` (8 vCPU); setup measured load average 94.53 / 83.94 / 80.36 with 93 runnable tasks. I will record load at each browser run and treat p99 as host-load-sensitive.
Author
Owner

Finding: apps/tracer/transfer-budget.ts skips every asset not ending in .js (line 34), so the current D188 gate would not count a .wasm download. I will compare each Wasm module plus its browser glue against the D188 limits explicitly; adopting it would also require the gate to include compressed .wasm assets.

Finding: `apps/tracer/transfer-budget.ts` skips every asset not ending in `.js` (line 34), so the current D188 gate would not count a `.wasm` download. I will compare each Wasm module plus its browser glue against the D188 limits explicitly; adopting it would also require the gate to include compressed `.wasm` assets.
Author
Owner

Parked by the owner 2026-10-12: "forget about the ios app for now, let's make mesh and app windows stable first". The WASM client-core spike resumes after mesh and app windows are stable.

Parked by the owner 2026-10-12: "forget about the ios app for now, let's make mesh and app windows stable first". The WASM client-core spike resumes after mesh and app windows are stable.
Sign in to join this conversation.
No labels
launch-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/infraternal#177
No description provided.