dependabot[bot] b0fcd4012c chore(deps): bump mainline from 6.2.0 to 7.0.0 (#4331)
Bumps [mainline](https://github.com/pubky/mainline) from 6.2.0 to 7.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pubky/mainline/releases">mainline's
releases</a>.</em></p>
<blockquote>
<h2>v7.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>refactor(rpc): simplify put query completion by <a
href="https://github.com/andrei-21"><code>@​andrei-21</code></a> in <a
href="https://redirect.github.com/pubky/mainline/pull/103">pubky/mainline#103</a></li>
<li>feat(async)!: return PUT outcome from raw put by <a
href="https://github.com/andrei-21"><code>@​andrei-21</code></a> in <a
href="https://redirect.github.com/pubky/mainline/pull/105">pubky/mainline#105</a></li>
<li>fix(rpc)!: stop GET queries from echoing pending PUTs by <a
href="https://github.com/andrei-21"><code>@​andrei-21</code></a> in <a
href="https://redirect.github.com/pubky/mainline/pull/106">pubky/mainline#106</a></li>
<li>feat(dht): add detailed mutable GET outcome by <a
href="https://github.com/andrei-21"><code>@​andrei-21</code></a> in <a
href="https://redirect.github.com/pubky/mainline/pull/107">pubky/mainline#107</a></li>
<li>feat(async)!: return <code>PutOutcome</code> from mutable puts by <a
href="https://github.com/andrei-21"><code>@​andrei-21</code></a> in <a
href="https://redirect.github.com/pubky/mainline/pull/109">pubky/mainline#109</a></li>
<li>feat(dht): deprecate blocking operations by <a
href="https://github.com/andrei-21"><code>@​andrei-21</code></a> in <a
href="https://redirect.github.com/pubky/mainline/pull/110">pubky/mainline#110</a></li>
<li>chore: v7.0.0 by <a
href="https://github.com/andrei-21"><code>@​andrei-21</code></a> in <a
href="https://redirect.github.com/pubky/mainline/pull/111">pubky/mainline#111</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pubky/mainline/compare/v6.2.0...v7.0.0">https://github.com/pubky/mainline/compare/v6.2.0...v7.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pubky/mainline/blob/main/CHANGELOG.md">mainline's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/pubky/mainline/compare/v6.2.0...v7.0.0">7.0.0</a>
- 2026-06-08</h2>
<h3>Added</h3>
<ul>
<li>Add <code>PutOutcome</code> to report the target and number of DHT
nodes that acknowledged a successful PUT.</li>
<li>Add <code>AsyncDht::get_mutable_detailed()</code> with
<code>GetMutableOutcome</code> diagnostics for queried nodes, valid
values, empty responses, invalid responses, KRPC errors, and
timeouts.</li>
</ul>
<h3>Changed</h3>
<ul>
<li><strong>BREAKING</strong>: <code>AsyncDht::put()</code> now returns
<code>PutOutcome</code> instead of a raw <code>Id</code>.</li>
<li><strong>BREAKING</strong>: <code>AsyncDht::put_mutable()</code> now
returns <code>PutOutcome</code> instead of a raw <code>Id</code>.</li>
<li>Mutable GET queries no longer echo locally pending mutable PUT
values; GET results now only come from DHT node responses.</li>
</ul>
<h3>Deprecated</h3>
<ul>
<li>Deprecate blocking <code>Dht</code> operation methods and
<code>GetIterator</code>; use the async API via
<code>Dht::as_async()</code> instead.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pubky/mainline/commit/e77f8060a947736a9f97d4f3001ad1b871f7bb29"><code>e77f806</code></a>
chore: v7.0.0 (<a
href="https://redirect.github.com/pubky/mainline/issues/111">#111</a>)</li>
<li><a
href="https://github.com/pubky/mainline/commit/8e777bc18b3d0958f646fe29895f33ff65490cb4"><code>8e777bc</code></a>
feat(dht): deprecate blocking operations (<a
href="https://redirect.github.com/pubky/mainline/issues/110">#110</a>)</li>
<li><a
href="https://github.com/pubky/mainline/commit/83252185cd1997c9ddee2bc6342d7243d40ded21"><code>8325218</code></a>
feat(async)!: return <code>PutOutcome</code> from mutable puts (<a
href="https://redirect.github.com/pubky/mainline/issues/109">#109</a>)</li>
<li><a
href="https://github.com/pubky/mainline/commit/1e38626a7d020e68f5df5ecead8245001d5a60ec"><code>1e38626</code></a>
feat(dht): add detailed mutable GET outcome (<a
href="https://redirect.github.com/pubky/mainline/issues/107">#107</a>)</li>
<li><a
href="https://github.com/pubky/mainline/commit/285c1fcf2f7bd5bba0b8836fb32890321426277e"><code>285c1fc</code></a>
fix(rpc)!: stop GET queries from echoing pending PUTs (<a
href="https://redirect.github.com/pubky/mainline/issues/106">#106</a>)</li>
<li><a
href="https://github.com/pubky/mainline/commit/96606a9a17d516a096c3494c3b1ef5a4e4cd8b88"><code>96606a9</code></a>
feat(async)!: return PUT outcome from raw put (<a
href="https://redirect.github.com/pubky/mainline/issues/105">#105</a>)</li>
<li><a
href="https://github.com/pubky/mainline/commit/e81c8a1048f1bed4951f9f765a522fc6021bc949"><code>e81c8a1</code></a>
refactor(rpc): simplify put query completion (<a
href="https://redirect.github.com/pubky/mainline/issues/103">#103</a>)</li>
<li>See full diff in <a
href="https://github.com/pubky/mainline/compare/v6.2.0...v7.0.0">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-12 12:18:10 +02:00
2026-04-07 18:38:38 +02:00
2026-06-11 16:13:45 +02:00
2024-04-29 10:08:12 +00:00
2026-04-02 10:21:54 +02:00
2024-01-23 14:36:54 +00:00
2026-05-27 10:56:35 +02:00
2023-11-08 11:47:24 +01:00
2024-01-23 14:36:54 +00:00
2026-06-11 16:13:45 +02:00

iroh

less net work for networks

Documentation Crates.io downloads Chat Youtube License: MIT License: Apache 2.0 CI


What is iroh?

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.

Hole-punching

The fastest route is a direct connection, so if necessary, iroh tries to hole-punch. Should this fail, it can fall back to an open ecosystem of public relay servers. To ensure these connections are as fast as possible, we continuously measure iroh.

Built on QUIC

Iroh uses noq to establish QUIC connections between endpoints. This way you get authenticated encryption, concurrent streams with stream priorities, a datagram transport and avoid head-of-line-blocking out of the box.

Compose Protocols

Use pre-existing protocols built on iroh instead of writing your own:

  • iroh-blobs for BLAKE3-based content-addressed blob transfer scaling from kilobytes to terabytes
  • iroh-gossip for establishing publish-subscribe overlay networks that scale, requiring only resources that your average phone can handle
  • iroh-docs for an eventually-consistent key-value store of iroh-blobs blobs

Getting Started

Rust Library

It's easiest to use iroh from rust. Install it using cargo add iroh, then on the connecting side:

const ALPN: &[u8] = b"iroh-example/echo/0";

let endpoint = Endpoint::bind().await?;

// Open a connection to the accepting endpoint
let conn = endpoint.connect(addr, ALPN).await?;

// Open a bidirectional QUIC stream
let (mut send, mut recv) = conn.open_bi().await?;

// Send some data to be echoed
send.write_all(b"Hello, world!").await?;
send.finish()?;

// Receive the echo
let response = recv.read_to_end(1000).await?;
assert_eq!(&response, b"Hello, world!");

// As the side receiving the last application data - say goodbye
conn.close(0u32.into(), b"bye!");

// Close the endpoint and all its connections
endpoint.close().await;

And on the accepting side:

let endpoint = Endpoint::bind().await?;

let router = Router::builder(endpoint)
    .accept(ALPN.to_vec(), Arc::new(Echo))
    .spawn()
    .await?;

// The protocol definition:
#[derive(Debug, Clone)]
struct Echo;

impl ProtocolHandler for Echo {
    async fn accept(&self, connection: Connection) -> Result<()> {
        let (mut send, mut recv) = connection.accept_bi().await?;

        // Echo any bytes received back directly.
        let bytes_sent = tokio::io::copy(&mut recv, &mut send).await?;

        send.finish()?;
        connection.closed().await;

        Ok(())
    }
}

The full example code with more comments can be found at echo.rs.

Or use one of the pre-existing protocols, e.g. iroh-blobs or iroh-gossip.

Other Languages

If you want to use iroh from other languages, make sure to check out iroh-ffi, the repository for FFI bindings.

Repository Structure

This repository contains a workspace of crates:

  • iroh: The core library for hole-punching & communicating with relays.
  • iroh-relay: The relay client and server implementation. This is the code we run in production for the public relays (and you can, too!).
  • iroh-base: Common types like EndpointId or RelayUrl.
  • iroh-dns-server: DNS server implementation powering the DNS/Pkarr address lookup for EndpointIds, running at dns.iroh.link.

License

Copyright 2025 N0, INC.

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

S
Description
IP addresses break, dial keys instead. A library that adds QUIC + NAT Traversal to your apps.
Readme
435 MiB
Languages
Rust 99.6%
Shell 0.3%