Conversation
817309b to
42d921f
Compare
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh-docs/pr/75/docs/iroh_docs/ Last updated: 2026-02-24T12:57:39Z |
dfd62c8 to
061ece7
Compare
|
I've taken the liberty of updating this PR, all of the upstream PRs this one depends on are now merged, we're only waiting on a release for n0-future that'll include the features this relies on. |
|
n0-future 0.3.1 is released now ✌️ |
|
Updated to use the n0-future release. I think this is ready for merge now :) |
|
TIL if you import Pushed what is hopefully a fix, but ideally we'd have a CI check that ensures we use the |
|
speaking of references to |
|
Excited to see this land! I'm building a P2P sync library for Obsidian (note-taking app) and have been designing around the iroh-docs API so we can swap it in once WASM support is ready. Looking forward to using native range reconciliation instead of our custom Prolly tree sync. 🎉 |
Resolve merge conflicts from rebasing the wasm support PR onto v0.96.0 main: - Cargo.toml: update dep versions to 0.96 era, keep default-features=false and optional quinn from wasm PR - tests/util.rs: use IntoAddressLookup (0.96 API) with Storage enum and n0_future::time from wasm PR - ci.yaml: keep main's docs-rs approach, keep wasm_build job from PR - Cargo.lock: regenerated
Make iroh-docs compile for wasm32-unknown-unknown (browser, memstore only). - Use `default-features = false` on iroh, iroh-blobs, iroh-gossip, irpc to exclude non-wasm-compatible code paths - Make quinn optional, gated behind `rpc` feature - Use n0_future::time instead of std::time for browser compatibility - Add cfg_aliases build script for `wasm_browser` convenience cfg - Add wasm build CI job - Several methods on `Replica` are now async (previously used send_blocking which is unavailable on wasm) Based on n0-computer#75, updated for iroh 0.96.
Resolve merge conflicts from n0-computer#75 against v0.96: - Update dependency versions to 0.96 era, keep default-features=false - Use IntoAddressLookup API (renamed from IntoDiscovery in 0.96) - Keep main's docs-rs CI approach - Regenerate Cargo.lock
Resolve merge conflicts from n0-computer#75 against v0.96: - Update dependency versions to 0.96 era, keep default-features=false - Use IntoAddressLookup API (renamed from IntoDiscovery in 0.96) - Keep main's docs-rs CI approach - Regenerate Cargo.lock
- Update dependency versions to 0.96 era, keep default-features=false - Drop iroh-blobs git dep, use released v0.98 - Use IntoAddressLookup API (renamed from IntoDiscovery in 0.96) - Keep main's docs-rs CI approach - Regenerate Cargo.lock
Description
Make iroh-docs work in WebAssembly in the browser, memstore only.
n0-futurefor time and tasks.redbworks in-memory in the browser. No persistent store for now. In native environments, we spawn a separate thread for the storage actor with a single-threaded tokio runtime. In wasm, we instead simply run this on the main thread. With the inmemory store this is fine, IMO.Replicaare now async because we previously usedsend_blockingon aasync_channel::Sender(uuh) andasync_channel::Sender::send_blockingis not available on wasm.Breaking Changes
Made a couple of methods on
Replicaasync because we previously usedsend_blockingon aasync_channel::Sender(uuh) andasync_channel::Sender::send_blockingis not available on wasm. This is a much needed refactor anyways.(needs more details)
Notes & open questions
Change checklist