Commit Graph
33 Commits
Author SHA1 Message Date
Lixin2026andFloris Bruynooghe 80548cef7a docs: update license links to HTTPS (#4365)
## Description

- Update Apache-2.0 and MIT license URLs in README files from HTTP to
HTTPS.
- Keep the local LICENSE links and license text unchanged.

## Breaking Changes

None.

## Notes & open questions

Docs-only change. Verified both HTTPS license URLs resolve successfully,
and ran `git diff --check`.

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the style guide, if relevant.
- [x] Tests if relevant. Not applicable; link-only documentation update.
- [x] All breaking changes documented. No breaking changes.

Co-authored-by: Floris Bruynooghe <flub@n0.computer>
2026-06-23 09:31:47 +02:00
Franz Heinzmann 710d03a634 docs(iroh): improve readme (#4329)
## Description

The [README of the iroh
crate](https://github.com/n0-computer/iroh/tree/main/iroh) is the first
thing people see on https://crates.io/crates/iroh or
https://lib.rs/iroh, and we should improve it.

Right now it mostly talks about structured events, which is a very minor
thing in the grand scheme of things. And it has no code example.

This PR improves the README. Happy to discuss or iterate.
2026-06-11 16:13:45 +02:00
Philipp Krüger 4033b3c545 chore(readme): Link to noq instead of Quinn (#3989)
## Description

Link to noq instead of linking to Quinn as the QUIC library that iroh
uses.
2026-03-05 10:27:41 +00:00
2d367f9365 feat(iroh): introduce endpoint presets (#3523)
## Description

Closes #3470

## Breaking Changes

- removed
  - `iroh::endpoint::Builder::n0_discovery`
  - `iroh::endpoint::Builder::discovery_dht`
  - `iroh::endpoint::Builder::discovery_local_network`
  - `iroh::endpoint::Builder::discovery`
  - `iroh::discovery::DiscoveryContext`
  - `iroh::endpoint::Builder::default`
- added
- `iroh::Endpoint::bind` - this allows to immediately create an
`Endpoint` with the defaults and binds it
  - `iroh::endpoint::Endpoint::empty_builder`
- `iroh::endpoint::presets` - new module, defining a trait on how to
preconfigure and `Endpoint`
- `iroh::endpoint::Builder::new` - creates a new builder with the `N0`
preset
  - `iroh::endpoint::Builder::preset`
- `iroh::endpoint::Builder::empty` - creates a new builder, completely
empty (no discovery, no relay map)
- changed
  - `iroh::'Endpoint::add_discovery` is now called just `discovery`
- `iroh::discovery::IntoDiscovery` now takes an `Endpoint` instead of a
`DiscoveryContext`

---------

Co-authored-by: ramfox <kasey@n0.computer>
Co-authored-by: “ramfox” <“kasey@n0.computer”>
2025-10-18 12:30:30 +00:00
Friedel Ziegelmayer 5eaf52adc4 chore: update copyright dates (#3543) 2025-10-15 15:14:32 +00:00
Friedel Ziegelmayer bfc6ba0b2c refactor!: rename Node to Endpoint in all cases (#3542)
## Description

This normalizes naming, to call the main iroh handle, `Endpoint` and
instead of`Node` in all cases.

Closes https://github.com/n0-computer/iroh/issues/3301

## Breaking Changes

- All APIs that include `Node` now use `Endpoint`

- renamed
  - `iroh_relay::RelayNode` -> `RelayConfig`
  - `iroh_base::NodeAddr` -> `EndpointAddr`
  - `iroh_base::NodeAddr.node_id` -> `endpoint_id`
  - `iroh_base::NodeId` -> `EndpointId`
  - `iroh_base::NodeTicket` -> `EndpointTicket`
  - `iroh::Endpoint::node_addr` -> `iroh::Endpoint::addr`
  - `iroh::Endpoint::watch_node_addr` -> `iroh::Endpoint::watchaddr`
  - `iroh::Endpoint::node_id` -> `iroh::Endpoint::id`
2025-10-15 13:31:01 +00:00
Franz Heinzmann e36ac776fe feat(iroh)!: make ProtocolHandler use async functions (#3320)
## Description

This changes the `ProtocolHandler` trait so that the functions return
`impl Future` instead of `BoxFuture`, which means implementors can
simply implement the trait with `async fn`. We don't even need a
`'static` bound on these futures, so you can use `&self` freely without
cloning and moving.

Internally, we still box the futures return by `accept`, `on_connecting`
and `shutdown`. So performance wise this change should not have any
effects. But the boxing is hidden from the user and implementing the
trait now feels a lot more normal and simpler.

## Breaking Changes

* `iroh::protocol::ProtocolHandler` methods now return `impl Future`
instead of `BoxFuture`. You can simply remove the `Box::pin(async move
{})` from the implementations and instead implement the methods as
`async fn`. See the updated documentation for the `iroh::protocol`
module for an example.
* `iroh::protocol::ProtocolHandler` is no longer dyn-compatible. If you
need a dyn-compatible version, you need to build your own dyn-compatible
wrapper trait. See the (non-public) `DynProtocolHandler` in
`iroh::protocol` as an example.

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
- [x] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
    - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
    - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
    - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
    - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
    - [ ] [`sendme`](https://github.com/n0-computer/sendme)
2025-05-28 11:37:46 +00:00
Friedel Ziegelmayer 3e168483b0 feat(iroh)!: allow for limiting incoming connections on the router (#3157)
## Description

Changes the `ProtocolHandler` trait to allow for intercepting
`connecting` and `connection` states explicitly

## Breaking Changes

- changed: `iroh::protocol::ProtocolHandler::accept` now takes
`Connection` instead of `Connecting`

## Notes & open questions

The new limiter could also just be part of the test code/an example,
instead of giving users an API, unclear to me

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
2025-03-14 08:38:17 +00:00
Philipp Krüger 247b89191d feat(iroh): Make iroh compile to wasm32-unknown-unknown (#3189)
## Description

(This PR is a rebase & some changes from the #3145 PR, so we don't
disturb users who are trying out the iroh browser alpha.)

- Adds a bunch of `#[cfg(not(wasm_browser))]` to anything related to
socket networking (UDP sockets, DNS, etc.)
- Implements a `WebRuntime` for quinn to use instead of `TokioRuntime`
in browsers
- Implements sleeping & timing utilities for `backoff` that work in
browsers
- Moves `node_info` out of the `dns` module, so we can disable `dns` as
a whole, but keep `node_info` for discovery
- Disables `MappedAddr::Ip` in browsers
- Adjusts dependencies so we don't depend on unused/unsupported things
in browsers

## Breaking Changes

- `iroh-relay`: The `iroh_relay::dns::node_info` module was moved to
`iroh_relay::node_info`

## Notes & open questions

I'm holding off on refactoring bigger parts for now. I have two main
ideas:
- Group a bunch of structs in `magicsock.rs`, i.e. everything that
depends on sockets.
However, to do this, I want to refactor the way we *sometimes* use
`Arc<netwatch::UdpSocket>` and *sometimes* use `UdpConn`, which is just
a newtype over said type.
Ideally we store `Arc<netwatch::UdpSocket>` everywhere, since it's more
commonly used in APIs, e.g. in iroh-net-report, and only use `UdpConn`,
when we need the udp sockets to implement `AsyncUdpSocket` from quinn.
- Refactor the `node_info` module so there's fewer places that depend on
`DnsResolver` in it.
There's a bunch of things in that module that IMO are needless
indirections (we go from `hickory::TxtLookup` ->
`node_info::TxtAttrs<IrohAttr>` -> `(NodeId, NodeData)` -> `NodeInfo`.
And even then, `NodeInfo` is mostly isomorphic to `NodeAttr`).

I think both these refactors are helpful, but don't necessarily make the
diff easier to read? Not sure. I'd like to merge this & then work on
these refactors next week.

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
2025-02-21 16:59:05 +00:00
Friedel Ziegelmayer 7b6884f844 refactor!: remove iroh-test crate (#3162)
## Description

These testutils we are using, actually can be replaced through either
simpler code or other crates. See the individual commits for the
alternatives

## Breaking Changes

- `iroh-test` crate is gone

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
2025-02-03 16:11:24 +00:00
Lawrence Adams e049965bd2 chore: update broken echo.rs link (#3151)
## Description

Broken link fixed.
2025-01-25 11:39:30 +00:00
Mat Kelly c532de35c0 docs: Fix typos in README (#3144)
## Description

This PR fixes two trivial typos in the README file.

## Breaking Changes

None

## Notes & open questions

None

## Change checklist

- [ ] Self-review.
- [X] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
2025-01-22 16:55:59 +00:00
Philipp Krüger 870c76edeb feat: Make Endpoint::close infallible (#3112)
## Description

<!-- A summary of what this pull request achieves and a rough list of
changes. -->
The only source for a `Result::Err` in `Endpoint::close` was a failed
magic sock actor `Shutdown` message send.

This send should basically shutdown the actor, and sending only fails
when the actor dropped the receiver, which only happens when the actor
already shut down, gracefully or otherwise. In any case, it can't react
to that anyways and it's not worth surfacing that error to the user.

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
- `iroh::Endpoint::close`'s future is now infallible, instead of
returning a `Result`.

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- ~~[ ] Tests if relevant.~~
- [x] All breaking changes documented.
2025-01-10 08:26:33 +00:00
Robert Syme ad6c535d33 docs: Update README.md (#3019)
## Description

Added necessary `https://` prefix to two links in main README.md to
avoid 404s.

## Breaking Changes

None - just README doc changes.

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant. (not relevant to this PR)
- [ ] All breaking changes documented. (not relevant to this PR)
2024-12-09 08:49:42 +00:00
Friedel Ziegelmayer e461cca8cd feat(iroh): improve shutdown interactions (#2980)
## Description

- ties the cancellation tokens between `Router` and `Endpoint` closer
together
- closing `Endpoint` is now idempotent

## Breaking Changes

- added `iroh::Endpoint::close` that takes no arguments anymore, it
default to using code `0` and an empty message
- added `iroh::Endpoint::is_closed`

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
2024-12-02 18:40:33 +00:00
Friedel Ziegelmayer 574337ad46 refactor: extract net-tools (#2991)
## Description

https://github.com/n0-computer/net-tools

Updates to newly published 

- `netwatch@0.2.0`
- `portmapper@0.2.0`

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
2024-12-02 18:39:53 +00:00
Philipp Krügeranddignifiedquire f7764ef130 refactor: Move iroh-router into iroh-net and rename iroh-net to iroh (#2973)
## Description

<!-- A summary of what this pull request achieves and a rough list of
changes. -->
This merges `iroh-net`, `iroh-router` and `iroh` into simply one crate:
`iroh`.

Also adjusts README and documentation messages.

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

- `iroh-net` got renamed to `iroh`
- `iroh-router` moved into `iroh`
- `iroh-router::ProtocolHandler` is now
`iroh::protocol::ProtocolHandler`
- `iroh-router::ProtocolMap` is now `iroh::protocol::ProtocolMap`
- `iroh-router::Router` is now `iroh::router::Router`
- `iroh-router::RouterBuilder` is now `iroh::router::RouterBuilder`

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->
Minor Q: Do the `iroh::protocol` and `iroh::router` modules make sense?

## Change checklist

- [ ] Fix "TODO(matheus23): docs" for `Router` etc.
- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.

---------

Co-authored-by: dignifiedquire <me@dignifiedquire.com>
2024-11-28 11:26:10 +00:00
Philipp Krüger 4abfd61fb6 docs: Rewrite README (& add echo.rs example) (#2960)
## Description

<!-- A summary of what this pull request achieves and a rough list of
changes. -->
- Rewrote the README
- Renamed `iroh-router/examples/custom-protocol.rs` to `search.rs` (It's
not a "custom" protocol. Just a protocol.) Removed "custom" wording
- Added a simpler `echo.rs` example (used in the README)


## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->
- In the "repository structure" section, I describe the purpose of
*some* crates, but not all. Since stuff will be moving around in the
coming weeks, I *think* that's, fine, but someone please tell me if we
should do sth differently there.

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
2024-11-26 11:58:48 +00:00
Friedel ZiegelmayerandAsmir Avdicevic a956319277 refactor!: remove default protocols and iroh-cli (#2928)
## Description

As previously announced and planned, this removes all protocol
implementations from the `iroh` crate, as well as removes the `iroh-cli`
crate.

The core functionality of those protocols, including RPC & CLI now is in
the individual crates.


## Remove from `iroh`

- [x] `iroh-docs`
- [x] `iroh-blobs`
- [x] `iroh-gossip`
 
## Examples

- [x] Move examples to the appropriate repos:
https://github.com/n0-computer/iroh-blobs/pull/15

## Tests

- [x] Move the remaining tests to the appropriate repos

CLI
- [x] Remove 

## Breaking Changes

- `iroh-cli` removed
  - the crate itself
- the ability to run `iroh` itself in a docker container, as there is no
binary anymore
- removed 
  - `iroh::blobs` use `iroh_blobs`
  - `iroh::docs` use `iroh_docs`
  - `iroh::gossip` use `iroh_gossip`
- `iroh::client::blobs` use `iroh_blobs::rpc::client`. a memory client
is available on Blobs
- `iroh::client::tags` use `iroh_blobs::rpc::client`. a memory client is
available on Blobs
- `iroh::client::gossip` use `iroh_gossip::rpc::client`. a memory client
is available on Gossip
- `iroh::client::docs` use `iroh_docs::rpc::client`. a memory client is
available on Docs
- `iroh::client::authors` use `iroh_docs::rpc::client`. a memory client
is available on Docs
  - `iroh::node::MemNode`, use `Node` directly
  - `iroh::node::FsNode`, use `Node` directly
  - `iroh::node::Node::local_pool_handle`
  - `iroh::node::builder::DocsStorage`
  - `iroh::node::builder::Builder::enable_gc_policy`
  - `iroh::node::builder::Builder::enable_docs`
  - `iroh::node::builder::Builder::register_cb_done`
  - `iroh::node::builder::ProtocolBuilder::local_pool_handle`
  - `iroh::node::builder::GcPolicy`
  - `iroh::util::progress`
  - `iroh::util::path::IrohPaths::BaoStoreDir`
  - `iroh::util::path::IrohPaths::DocsDatabase `
  - `iroh::util::path::IrohPaths::Console`
  - `iroh::util::path::IrohPaths::DefaultAuthor`
- `iroh::node::Builder` has no more generic parameters anymore
- `iroh::node::Node` has no more generic parameters anymore



## Notes & open questions



## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.

---------

Co-authored-by: Asmir Avdicevic <asmir.avdicevic64@gmail.com>
2024-11-25 21:36:52 +00:00
Philipp Krüger 5acce9c461 chore: Fix important readme design issue (flat square style consistency) (#2931)
## Description

It's important.
Before:

![image](https://github.com/user-attachments/assets/6128793d-6162-4dbd-9688-cca16dacebe1)
After:

![image](https://github.com/user-attachments/assets/14e65c02-d26c-4840-90ac-c52d0dc75ff0)

See? A much better "failing" badge :|

## Breaking Changes

If at all, this un-breaks me tbh.

## Notes & open questions

How come I look this rarely at the readme.

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
2024-11-14 16:05:02 +00:00
Asmir Avdicevic 61f3f7e8a3 chore(docs): update readme (#2465)
## Description

Is the tagline correct?
Can we enable this discord widget?

## Breaking Changes

<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
2024-07-08 10:30:18 +00:00
Friedel ZiegelmayerandFloris Bruynooghe 5c70cd2a51 feat: split CLI implementation into a new iroh-cli crate (#2076)
Isolates the CLI implementation to its own crate.

---------

Co-authored-by: Floris Bruynooghe <flub@n0.computer>
2024-03-14 19:17:50 +00:00
Mat Kelly 156ce074bc docs: fix link to install URL in README (#1476)
## Description

Fixes a link in the README to correctly point to the documentation.

## Notes & open questions

N/A

## Change checklist

- [ ] Self-review.
- [X] Documentation updates if relevant.
- [ ] Tests if relevant.
2023-09-13 09:29:32 +00:00
Mat Kelly 1df9255744 docs: Fix grammar in README (#1465)
## Description

This slight tweak to the README fixes a grammar issue in using "it's"
vs. "its".

## Notes & open questions

N/A

## Change checklist

- [ ] Self-review.
- [X] Documentation updates if relevant.
- [ ] Tests if relevant.
2023-09-07 07:26:39 +00:00
MahmoudandFloris Bruynooghe cf50c91a78 chore: Update README.md (#1360)
* Update README.md

* Update README.md

---------

Co-authored-by: Floris Bruynooghe <flub@n0.computer>
2023-08-16 13:16:54 +00:00
Brendan O'Brien 33464a7a43 docs: update root, iroh, iroh-metrics readmes (#1258)
* docs: update readme.md
* docs: iroh crate readme
* add very basic iroh-metrics README
2023-07-17 21:48:09 +00:00
Brendan O'BrienandDiva M 04c7247cd4 chore: add explict parity acknowledgement on cert & verifier files, clarify codebase copyright is assigned to n0, inc. (#1167)
* chore: add explict parity acknowledgement on cert & verifier files

* um, it's not 2024

* give attribution in a less extreme way

---------

Co-authored-by: Diva M <divma@protonmail.com>
2023-07-05 15:34:24 -05:00
Ar Nazeh a12de97431 docs: fix typo (#792)
I assume it is a typo.
2023-02-24 11:00:33 +01:00
Friedel Ziegelmayer 70f991230d docs: updates for release 2023-02-22 15:19:35 +01:00
Friedel Ziegelmayer e3012f0cb4 feat: rename to iroh 2023-02-20 16:53:58 +01:00
Kasey 8c254f3ea5 use default-features = false when importing sendme as a library (#110)
closes #74 

Isolate `cli` specific crates behind the `cli` feature.
2023-02-03 11:03:17 -05:00
dignifiedquire de344092c9 refactor: rename server & client
Closes #40
2023-01-23 15:09:45 +01:00
dignifiedquire b37c1357b6 docs: add readme and license
Closes #15,#1
2023-01-18 11:18:04 +01:00