## 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>
## 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.
## 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”>
## 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)
## 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.
## 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.
## 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.
## 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.
## 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)
## 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.
## 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.
## 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>
## 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.
## 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>
## 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.
## 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.
## 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.
* 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>