the networking stack for user agency

Iroh is a library for building on direct connections between devices, putting more control in the hands of your users.

In stark contrast to other p2p & dweb technologies we've played with - which are exciting due to their implications for the future - Iroh brought instant gains in our present.

- The Weird Team

Connect any two devices on the planet

Iroh gives you an API for dialing by public key. You say “connect to that phone”, iroh will find & maintain the fastest connection for you, regardless of where it is.

Compose your own tailor-made protocol stack

An ecosystem of ready-made, composable protocols are built on top of iroh.
Mix & match to get the feature set you need.

Blobs

Resumable, verifiable data transfer

Gossip

Broadcast messages to groups of nodes by topic.

Documents

Realtime, multiwriter, key-value sync

Willow

multiwriter, key-value sync with fine-grained access control

Automerge

CRDT-powered collaborative documents

Learn More

BYOP (build your own protocol)

Don't see a protocol you need? Build your own! Iroh gives you a reliable foundation for building distributed systems that reach the edge. The rest is up to you.

Custom Protocol Docs

Real World Use

Iroh is running in production on hundreds of thousands of devices, on all major platforms.

Delta Chat

Iroh powers multi-device backup & live connections for in-chat WebXDC apps.</p>

Build in your language

Iroh supports a growing set of languages, embedding nodes directly in your project without any need to call out to an external API

start building

doc get

use anyhow::Result;
use futures::stream::TryStreamExt;

#[tokio::main]
async fn main() -> Result<()> {
    // build the node
    let node = iroh::node::Node::memory().spawn().await?;

    // create 2 documents
    let _doc_0 = node.docs.create().await?;
    let _doc_1 = node.docs.create().await?;

    // list newly created docs
    println!("List all docs:");
    let mut docs = node.docs.list().await?;
    while let Some((doc_id, _capability)) = docs.try_next().await? {
        println!("{doc_id}");
    }

    Ok(())
}