Skip to content

Conversation

@Frando
Copy link
Member

@Frando Frando commented Nov 3, 2025

Description

Make iroh-docs work in WebAssembly in the browser, memstore only.

Depends on n0-computer/iroh-blobs#187
Depends on n0-computer/n0-future#17
Depends on n0-computer/n0-future#16

  • Has the usual changes to use n0-future for time and tasks.
  • redb works 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.
  • This PR includes a refactor that was needed anyway: A couple of methods on Replica are now async because we previously used send_blocking on a async_channel::Sender (uuh) and async_channel::Sender::send_blocking is not available on wasm.

Breaking Changes

Made a couple of methods on Replica async because we previously used send_blocking on a async_channel::Sender (uuh) and async_channel::Sender::send_blocking is not available on wasm. This is a much needed refactor anyways.

(needs more details)

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@n0bot n0bot bot added this to iroh Nov 3, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Nov 3, 2025
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

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: 2025-11-03T15:53:02Z

@Frando Frando marked this pull request as ready for review November 3, 2025 14:55
@Frando Frando changed the title (wip) feat: build on wasm feat: build on wasm Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

2 participants