docs: wasm — core now compiles to wasm32 (all 4 structural items done)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -469,25 +469,23 @@ multi-modal payloads (text inline, audio/photo/data via `iroh-blobs`). Receiving
|
|||||||
- [ ] 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
|
- [~] **Web client = `tethercore` on `wasm32`** — relay-only iroh peer, same
|
||||||
core, no server bridge. (Correction: it's more *project* than *build
|
core, no server bridge. **The core now COMPILES to wasm32** (`build-web.sh`
|
||||||
target* — see below.)
|
→ `tethercore.wasm`); native is byte-unaffected.
|
||||||
- [x] **Groundwork done** — deps are target-split: native-only transports
|
- [x] Deps target-split (native-only transports/UniFFI/native-reqwest under
|
||||||
(tokio-net/mdns/webrtc) + UniFFI + native reqwest under
|
`cfg(not(wasm32))`; wasm gets fetch-reqwest + wasm-bindgen-futures).
|
||||||
`cfg(not(wasm32))`; wasm gets minimal tokio + fetch-reqwest +
|
- [x] **UniFFI decoupled** — all FFI macros `cfg_attr`'d to native; wasm
|
||||||
wasm-bindgen-futures + iroh (`default-features=false`). SSE/RTC/LAN
|
will bind via wasm-bindgen.
|
||||||
gated to native; getrandom wasm rng wired. `cargo build --target
|
- [x] **iroh on wasm** — `default-features=false` + `tls-ring` (ring builds
|
||||||
wasm32-unknown-unknown --features iroh-transport` now reaches
|
for wasm with a wasm clang) + `iroh-gossip/net`; getrandom `wasm_js`.
|
||||||
tethercore's own code: **15 errors, 4 structural clusters.** Native
|
- [x] **Runtime abstraction** — a `Spawner` replaces the tokio `Handle`
|
||||||
unaffected.
|
across `Transport`/Engine: tokio runtime on native, `spawn_local` on
|
||||||
- [ ] **Decouple UniFFI** (10 errs) — the FFI macros are on every public
|
wasm. IrohTransport's timers use `n0-future` (no tokio::time on wasm).
|
||||||
item; gate them out for wasm and add a `wasm-bindgen` surface instead.
|
- [x] reqwest `.timeout()` cfg'd to native.
|
||||||
- [ ] **iroh wasm feature set** (2 errs) — `default-features=false` strips
|
- [ ] **wasm-bindgen JS surface + browser shim** — expose Engine/handler to
|
||||||
`presets::N0` / `iroh_gossip::net`; find the right wasm features.
|
JS, then a minimal browser smoke test. Relay-only in-browser
|
||||||
- [ ] **Runtime** (1 err) — the engine builds a tokio multi-thread runtime;
|
(no holepunch in the sandbox).
|
||||||
wasm needs `spawn_local` + `?Send` futures (the real refactor — the
|
- [ ] Toolchain note: the wasm build needs a wasm-capable clang for ring
|
||||||
`Transport`/spawn signatures differ by target).
|
(Homebrew LLVM) + the getrandom rustflag — both wired in `build-web.sh`.
|
||||||
- [ ] **reqwest `.timeout()`** (1 err) — not on the fetch backend; cfg it out.
|
|
||||||
- [ ] Then `wasm-bindgen` + a JS shim; relay-only in-browser (no holepunch).
|
|
||||||
- [ ] **Retire the Go server** once IrohTransport wins — replace with a
|
- [ ] **Retire the Go server** once IrohTransport wins — replace with a
|
||||||
self-hosted iroh-relay (supernode #1) + a tiny gossip-bootstrap rendezvous.
|
self-hosted iroh-relay (supernode #1) + a tiny gossip-bootstrap rendezvous.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user