IP addresses break, dial keys instead. A library that adds QUIC + NAT Traversal to your apps. https://iroh.computer
  • Rust 99.6%
  • Shell 0.3%
Find a file
dependabot[bot] 40833b58fb
chore(deps): bump redb from 4.4.0 to 4.5.0 (#4702)
Bumps [redb](https://github.com/cberner/redb) from 4.4.0 to 4.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cberner/redb/releases">redb's
releases</a>.</em></p>
<blockquote>
<h2>4.5.0</h2>
<h3>Multi-process support</h3>
<p>Database files cannot be shared between processes using these modes
and processes using the
<code>experimental-multiprocess</code> feature of redb 4.3 or 4.4. Their
locking is incompatible, and 4.5
can't detect the older processes.</p>
<ul>
<li>Add <code>Builder::set_concurrency_mode()</code>, which takes a
<code>ConcurrencyMode</code> configuring how processes
may share the database.</li>
<li><code>ConcurrencyMode::ExclusiveWriter</code> (the default) locks
the whole file, as earlier versions do.</li>
<li><code>ConcurrencyMode::SingleWriter</code> allows one process to
write, and any number of processes may open
the database read-only.</li>
<li><code>ConcurrencyMode::MultiWriter</code> allows any number of
processes to open the database for
writing, one write transaction at a time, and any number may open it
read-only.</li>
</ul>
<h3>New features</h3>
<ul>
<li>Add <code>Builder::open_read_only_with_backend()</code> to open a
read-only database from a storage backend.</li>
<li>Add <code>Builder::set_check_integrity_on_open()</code>, which
verifies the whole file on every <code>open()</code>
instead of trusting the state recorded by a clean shutdown.</li>
<li>Add <code>ReadOnlyDatabase::close()</code>, which releases the file
and its locks without waiting for the
read transactions opened from the database to be dropped.</li>
<li>Add <code>Database::close()</code>, which closes the database as
dropping it does, but returns any error
rather than ignoring it.</li>
<li>Add <code>Database::try_begin_write()</code>, which returns
<code>TransactionError::WouldBlock</code> instead of
waiting for an in-progress write transaction to finish.</li>
</ul>
<h3>Performance</h3>
<ul>
<li>Operations on tables with <code>&amp;str</code> or
<code>String</code> keys are faster.</li>
</ul>
<h3>Deprecations</h3>
<ul>
<li><code>Builder::create_file()</code> is deprecated; use
<code>Builder::create_with_backend(FileBackend::new(file)?)</code>
instead.</li>
<li><code>WriteTransaction::print_allocated_page_debug()</code> is
deprecated. It is an internal debugging aid,
present only in debug builds.</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li><code>open()</code> reports a malformed allocator state as
<code>StorageError::Corrupted</code> instead of panicking.</li>
<li>Repair and <code>check_integrity()</code> verify the trees kept by
persistent savepoints, which were not
checked before.</li>
<li>Fix <code>cache_stats()</code>, with the <code>cache_metrics</code>
feature, panicking in debug builds or returning a
<code>write_misses()</code> near <code>u64::MAX</code> in release builds
when called while another thread is writing.</li>
<li>Repair, <code>check_integrity()</code>, and <code>commit()</code>
report some forms of file corruption as
<code>StorageError::Corrupted</code> instead of panicking. This cannot
occur in normal operation, and only effects database which were
externally modified.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/cberner/redb/blob/master/CHANGELOG.md">redb's
changelog</a>.</em></p>
<blockquote>
<h2>4.5.0 - 2026-11-05</h2>
<h3>Multi-process support</h3>
<p>Database files cannot be shared between processes using these modes
and processes using the
<code>experimental-multiprocess</code> feature of redb 4.3 or 4.4. Their
locking is incompatible, and 4.5
can't detect the older processes.</p>
<ul>
<li>Add <code>Builder::set_concurrency_mode()</code>, which takes a
<code>ConcurrencyMode</code> configuring how processes
may share the database.</li>
<li><code>ConcurrencyMode::ExclusiveWriter</code> (the default) locks
the whole file, as earlier versions do.</li>
<li><code>ConcurrencyMode::SingleWriter</code> allows one process to
write, and any number of processes may open
the database read-only.</li>
<li><code>ConcurrencyMode::MultiWriter</code> allows any number of
processes to open the database for
writing, one write transaction at a time, and any number may open it
read-only.</li>
</ul>
<h3>New features</h3>
<ul>
<li>Add <code>Builder::open_read_only_with_backend()</code> to open a
read-only database from a storage backend.</li>
<li>Add <code>Builder::set_check_integrity_on_open()</code>, which
verifies the whole file on every <code>open()</code>
instead of trusting the state recorded by a clean shutdown.</li>
<li>Add <code>ReadOnlyDatabase::close()</code>, which releases the file
and its locks without waiting for the
read transactions opened from the database to be dropped.</li>
<li>Add <code>Database::close()</code>, which closes the database as
dropping it does, but returns any error
rather than ignoring it.</li>
<li>Add <code>Database::try_begin_write()</code>, which returns
<code>TransactionError::WouldBlock</code> instead of
waiting for an in-progress write transaction to finish.</li>
</ul>
<h3>Performance</h3>
<ul>
<li>Operations on tables with <code>&amp;str</code> or
<code>String</code> keys are faster.</li>
</ul>
<h3>Deprecations</h3>
<ul>
<li><code>Builder::create_file()</code> is deprecated; use
<code>Builder::create_with_backend(FileBackend::new(file)?)</code>
instead.</li>
<li><code>WriteTransaction::print_allocated_page_debug()</code> is
deprecated. It is an internal debugging aid,
present only in debug builds.</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li><code>open()</code> reports a malformed allocator state as
<code>StorageError::Corrupted</code> instead of panicking.</li>
<li>Repair and <code>check_integrity()</code> verify the trees kept by
persistent savepoints, which were not
checked before.</li>
<li>Fix <code>cache_stats()</code>, with the <code>cache_metrics</code>
feature, panicking in debug builds or returning a
<code>write_misses()</code> near <code>u64::MAX</code> in release builds
when called while another thread is writing.</li>
<li>Repair, <code>check_integrity()</code>, and <code>commit()</code>
report some forms of file corruption as
<code>StorageError::Corrupted</code> instead of panicking. This cannot
occur in normal operation, and only effects database which were
externally modified.</li>
</ul>
<h2>redb-derive 0.2.0 - 2026-10-13</h2>
<ul>
<li>Fix <code>#[derive(Value)]</code> and <code>#[derive(Key)]</code>
failing to compile on structs whose lifetimes are
named <code>'a</code> or <code>'b</code>; the generated implementations
no longer shadow the struct's lifetimes.</li>
<li>Fix the derived implementations calling inherent methods named
<code>fixed_width</code>, <code>from_bytes</code>,
<code>as_bytes</code>, or <code>type_name</code> on field types, instead
of the <code>Value</code> trait methods. The
generated code now uses fully qualified paths, and no longer requires
the <code>Value</code> and <code>Key</code>
traits to be in scope at the derive site.</li>
<li>Add <code>#[redb(crate = &quot;...&quot;)]</code> to name the crate
the implementations are generated for, when
redb is renamed or present in several versions. Structs with fields
require redb 3.0+.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="96ce31fe5c"><code>96ce31f</code></a>
Bump version to 4.5.0</li>
<li><a
href="9ee2405731"><code>9ee2405</code></a>
Update changelog</li>
<li><a
href="7ad68a3105"><code>7ad68a3</code></a>
redb-python: the README no longer says write transactions take
turns</li>
<li><a
href="17a28fa017"><code>17a28fa</code></a>
redb-python: leaving <code>with db:</code> keeps the exception that is
propagating</li>
<li><a
href="58a001d184"><code>58a001d</code></a>
Leave development files out of the crates.io package and the Python
sdist</li>
<li><a
href="fffa5fa93d"><code>fffa5fa</code></a>
redb-python: Ctrl-C interrupts a begin_write() waiting for another
writer</li>
<li><a
href="893a1be8e4"><code>893a1be</code></a>
Add Database::try_begin_write(), which returns WouldBlock rather than
waiting</li>
<li><a
href="7b70c6942d"><code>7b70c69</code></a>
redb-python: both databases close through redb's close(), in one
helper</li>
<li><a
href="77258c3eab"><code>77258c3</code></a>
redb-python: reads after close are left to redb, without
check_open()</li>
<li><a
href="ff4a789bdd"><code>ff4a789</code></a>
redb-python: entering a closed database raises DatabaseClosed</li>
<li>Additional commits viewable in <a
href="https://github.com/cberner/redb/compare/v4.4.0...v4.5.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=redb&package-manager=cargo&previous-version=4.4.0&new-version=4.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
2026-11-19 23:01:51 +00:00
.cargo fix: handle wine properly (#3902) 2026-04-07 18:38:38 +02:00
.config feat: update noq and net-tools to latest (#4088) 2026-04-08 15:34:34 +02:00
.github chore(deps): bump taiki-e/install-action from 2.90.1 to 2.90.3 in the github-actions group (#4704) 2026-11-19 22:54:12 +00:00
.img docs: update root, iroh, iroh-metrics readmes (#1258) 2023-07-17 21:48:09 +00:00
docker refactor(iroh)!: rework net_report (#3314) 2025-06-24 13:31:24 +00:00
iroh fix(iroh): read time from tokio in the noq runtime (#4677) 2026-11-19 17:45:39 +00:00
iroh-base chore: Release 2026-11-18 23:23:38 -05:00
iroh-dns chore: Release 2026-11-18 23:23:38 -05:00
iroh-dns-server chore: Release 2026-11-18 23:23:38 -05:00
iroh-relay chore: Release 2026-11-18 23:23:38 -05:00
.dockerignore feat: docker images for iroh (#2404) 2024-07-08 11:17:31 +00:00
.gitattributes fix(ci): release builds (#2219) 2024-04-29 10:08:12 +00:00
.gitignore tests: add patchbay tests (#3986) 2026-04-02 10:21:54 +02:00
.typos.toml chore: introduce crate-ci/typos (#2430) 2024-06-30 20:33:56 +00:00
AI_POLICY.md chore(*): fix link in AI_POLICY.md (#4583) 2026-10-06 18:03:03 +00:00
Cargo.lock chore(deps): bump redb from 4.4.0 to 4.5.0 (#4702) 2026-11-19 23:01:51 +00:00
Cargo.toml deps: upgrade noq, tokio-rustls-acme, and patchbay deps (#4701) 2026-11-18 22:52:57 -05:00
CHANGELOG.md chore: Release 2026-11-18 23:23:38 -05:00
CHANGELOG_old.md chore: Fix typos (#1964) 2024-01-23 14:36:54 +00:00
cliff.toml chore: additional git-cliff fixes 2026-10-21 13:01:19 -04:00
code_of_conduct.md chore: Fix typos (#1964) 2024-01-23 14:36:54 +00:00
CONTRIBUTING.md docs(*): Add new policies around PR creation and AI use. (#4575) 2026-10-02 16:42:21 +00:00
deny.toml deps: upgrade noq, tokio-rustls-acme, and patchbay deps (#4701) 2026-11-18 22:52:57 -05:00
example.config.toml refactor!: rename Node to Endpoint in all cases (#3542) 2025-10-15 13:31:01 +00:00
LICENSE-APACHE chore: update copyright dates (#3543) 2025-10-15 15:14:32 +00:00
LICENSE-MIT chore: update copyright dates (#3543) 2025-10-15 15:14:32 +00:00
Makefile.toml chore: Update Makefile.toml to have a normal dev workflow (#4508) 2026-10-28 13:38:21 +00:00
README.md docs: update license links to HTTPS (#4365) 2026-06-23 09:31:47 +02:00
release.toml chore: switch to git-cliff for changelog generation 2023-11-08 11:46:12 +01:00
TRANSPORTS.md feat: Implement custom transports (#3845) 2026-03-05 11:11:51 +00: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.