docs: web client verified syncing — browser↔Mac clipboard over iroh

Mark the wasm web-client milestone done (was [~] compiles → [x] verified):
the relay-only browser peer now syncs the clipboard both ways with native
peers. Record the two wasm fixes (Instant::now panic via web-time; gossip
island via join_peers) and check off the wasm-bindgen JS surface item.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-23 20:09:49 -05:00
parent 3d4af095b1
commit 6d76c7093d

View File

@@ -468,9 +468,18 @@ multi-modal payloads (text inline, audio/photo/data via `iroh-blobs`). Receiving
- [ ] Rotatable rooms/keys/identities + stable-handle directory indirection. - [ ] Rotatable rooms/keys/identities + stable-handle directory indirection.
- [ ] Private discovery (OPRF/PSI lookup; ZKP ownership proofs). - [ ] Private discovery (OPRF/PSI lookup; ZKP ownership proofs).
- [ ] Capability model (UCAN); offline mailbox. - [ ] Capability model (UCAN); offline mailbox.
- [~] **Web client = `tethercore` on `wasm32`** — relay-only iroh peer, same - [x] **Web client = `tethercore` on `wasm32`** — relay-only iroh peer, same
core, no server bridge. **The core now COMPILES to wasm32** (`build-web.sh` core, no server bridge. **Compiles AND verified syncing**: text typed in a
`tethercore.wasm`); native is byte-unaffected. browser tab lands on the Mac clipboard and vice-versa, cross-relay, with the
wasm engine running as a relay-only iroh peer (`build-web.sh`
`tethercore.wasm` + `web/index.html` demo). Native is byte-unaffected.
Two wasm-specific bugs had to be fixed to get delivery (both in the
browser-sync commit):
`Engine::send` panicked — `directly_covered()``Instant::now()` traps on
wasm32-unknown-unknown; `web-time` backs it with `Performance.now()`.
• Gossip island — a node that bootstrapped its topic alone never pulled
later-joining peers into its active view; the rendezvous re-register loop
now seeds peer relay addrs + `GossipSender::join_peers` each round.
- [x] Deps target-split (native-only transports/UniFFI/native-reqwest under - [x] Deps target-split (native-only transports/UniFFI/native-reqwest under
`cfg(not(wasm32))`; wasm gets fetch-reqwest + wasm-bindgen-futures). `cfg(not(wasm32))`; wasm gets fetch-reqwest + wasm-bindgen-futures).
- [x] **UniFFI decoupled** — all FFI macros `cfg_attr`'d to native; wasm - [x] **UniFFI decoupled** — all FFI macros `cfg_attr`'d to native; wasm
@@ -481,9 +490,10 @@ multi-modal payloads (text inline, audio/photo/data via `iroh-blobs`). Receiving
across `Transport`/Engine: tokio runtime on native, `spawn_local` on across `Transport`/Engine: tokio runtime on native, `spawn_local` on
wasm. IrohTransport's timers use `n0-future` (no tokio::time on wasm). wasm. IrohTransport's timers use `n0-future` (no tokio::time on wasm).
- [x] reqwest `.timeout()` cfg'd to native. - [x] reqwest `.timeout()` cfg'd to native.
- [ ] **wasm-bindgen JS surface + browser shim**expose Engine/handler to - [x] **wasm-bindgen JS surface + browser shim**`WasmEngine` +
JS, then a minimal browser smoke test. Relay-only in-browser `roomForAccount` exposed to JS (`src/wasm.rs`); `web/index.html` is the
(no holepunch in the sandbox). smoke test. Relay-only in-browser (no holepunch in the sandbox)
confirmed: browser↔Mac clipboard syncs both ways over the n0 relay.
- [ ] Toolchain note: the wasm build needs a wasm-capable clang for ring - [ ] Toolchain note: the wasm build needs a wasm-capable clang for ring
(Homebrew LLVM) + the getrandom rustflag — both wired in `build-web.sh`. (Homebrew LLVM) + the getrandom rustflag — both wired in `build-web.sh`.
- [ ] **Retire the Go server** once IrohTransport wins — replace with a - [ ] **Retire the Go server** once IrohTransport wins — replace with a