Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(iroh-net): add deprecation notice, bump to 0.28.2 #3116

Merged
merged 2 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions iroh-dns-server/examples/convert.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)]

use std::str::FromStr;

use clap::Parser;
Expand Down
2 changes: 2 additions & 0 deletions iroh-dns-server/examples/publish.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)]

use std::str::FromStr;

use anyhow::{bail, Result};
Expand Down
2 changes: 2 additions & 0 deletions iroh-dns-server/examples/resolve.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)]

use std::net::SocketAddr;

use clap::{Parser, ValueEnum};
Expand Down
1 change: 1 addition & 0 deletions iroh-dns-server/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! A DNS server and pkarr relay

#![allow(deprecated)]
#![deny(missing_docs, rustdoc::broken_intra_doc_links)]

pub mod config;
Expand Down
4 changes: 2 additions & 2 deletions iroh-net/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "iroh-net"
version = "0.28.1"
version = "0.28.2"
edition = "2021"
readme = "README.md"
description = "networking support for iroh"
description = "networking support for iroh (deprecated, use the iroh crate)"
license = "MIT OR Apache-2.0"
authors = ["dignifiedquire <[email protected]>", "n0 team"]
repository = "https://github.com/n0-computer/iroh"
Expand Down
7 changes: 7 additions & 0 deletions iroh-net/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# iroh-net

<div class="warning">

The `iroh-net` crate has been renamed to `iroh`. Please use the
`iroh` crate instead.

</div>

This crate contains the networking support for iroh. Iroh networking is built on direct peer-to-peer [QUIC](https://en.wikipedia.org/wiki/QUIC) connections that use relays and holepunching. The main structure for connection is the `Endpoint` entrypoint.

Peer to peer connectivity is established with the help of a _relay server_. The relay server provides Session Traversal Utilities for NAT [(STUN)](https://en.wikipedia.org/wiki/STUN) for the peers and connection coordination using the [DERP protocol](https://pkg.go.dev/tailscale.com/derp) (Designated Relay for Encrypted Packets protocol). If no direct connection can be established, the connection is relayed via the server.
Expand Down
2 changes: 2 additions & 0 deletions iroh-net/bench/src/bin/bulk.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)]

use std::collections::BTreeMap;

use anyhow::Result;
Expand Down
2 changes: 2 additions & 0 deletions iroh-net/bench/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)]

use std::{
num::ParseIntError,
str::FromStr,
Expand Down
3 changes: 3 additions & 0 deletions iroh-net/examples/connect-unreliable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
//! This example uses the default relay servers to attempt to holepunch, and will use that relay server to relay packets if the two devices cannot establish a direct UDP connection.
//!
//! Run the `listen-unreliable` example first (`iroh-net/examples/listen-unreliable.rs`), which will give you instructions on how to run this example to watch two nodes connect and exchange bytes.

#![allow(deprecated)]

use std::net::SocketAddr;

use anyhow::Context;
Expand Down
3 changes: 3 additions & 0 deletions iroh-net/examples/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
//! This example uses the default relay servers to attempt to holepunch, and will use that relay server to relay packets if the two devices cannot establish a direct UDP connection.
//!
//! Run the `listen` example first (`iroh-net/examples/listen.rs`), which will give you instructions on how to run this example to watch two nodes connect and exchange bytes.

#![allow(deprecated)]

use std::net::SocketAddr;

use anyhow::Context;
Expand Down
3 changes: 3 additions & 0 deletions iroh-net/examples/dht_discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
//! You can look at the published pkarr DNS record using <https://app.pkarr.org/>.
//!
//! To see what is going on, run with `RUST_LOG=iroh_pkarr_node_discovery=debug`.

#![allow(deprecated)]

use std::str::FromStr;

use clap::Parser;
Expand Down
3 changes: 3 additions & 0 deletions iroh-net/examples/listen-unreliable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
//! This example uses the default relay servers to attempt to holepunch, and will use that relay server to relay packets if the two devices cannot establish a direct UDP connection.
//! run this example from the project root:
//! $ cargo run --example listen-unreliable

#![allow(deprecated)]

use anyhow::Context;
use futures_lite::StreamExt;
use iroh_net::{key::SecretKey, relay::RelayMode, Endpoint};
Expand Down
3 changes: 3 additions & 0 deletions iroh-net/examples/listen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
//! This example uses the default relay servers to attempt to holepunch, and will use that relay server to relay packets if the two devices cannot establish a direct UDP connection.
//! run this example from the project root:
//! $ cargo run --example listen

#![allow(deprecated)]

use std::time::Duration;

use anyhow::Context;
Expand Down
3 changes: 3 additions & 0 deletions iroh-net/examples/locally-discovered-nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
//! This example creates an iroh endpoint, a few additional iroh endpoints to discover, waits a few seconds, and reports all of the iroh NodeIds (also called `[iroh_net::key::PublicKey]`s) it has discovered.
//!
//! This is an async, non-determinate process, so the number of NodeIDs discovered each time may be different. If you have other iroh endpoints or iroh nodes with [`LocalSwarmDiscovery`] enabled, it may discover those nodes as well.

#![allow(deprecated)]

use std::time::Duration;

use iroh_net::{
Expand Down
2 changes: 2 additions & 0 deletions iroh-net/src/bin/iroh-relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
//! This handles only the CLI and config file loading, the server implementation lives in
//! [`iroh_net::relay::server`].

#![allow(deprecated)]

use std::{
net::{Ipv6Addr, SocketAddr},
path::{Path, PathBuf},
Expand Down
11 changes: 11 additions & 0 deletions iroh-net/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
//! Peer-to-peer QUIC connections.
//!
//! <div class="warning">
//!
//! The `iroh-net` crate has been renamed to `iroh`. Please use the
//! `iroh` crate instead.
//!
//! </div>
//!
matheus23 marked this conversation as resolved.
Show resolved Hide resolved
//! iroh-net is a library to establish direct connectivity between peers. It exposes an
//! interface to [QUIC] connections and streams to the user, while implementing direct
//! connectivity using [hole punching] complemented by relay servers under the hood.
Expand Down Expand Up @@ -230,6 +237,10 @@
//! [`Connection::open_bi`]: crate::endpoint::Connection::open_bi
//! [`Connection::accept_bi`]: crate::endpoint::Connection::accept_bi

#![deprecated(
note = "This crate has been renamed from 'iroh-net' to 'iroh', please use the new crate"
)]
#![allow(deprecated)]
#![recursion_limit = "256"]
#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
#![cfg_attr(iroh_docsrs, feature(doc_cfg))]
Expand Down
2 changes: 2 additions & 0 deletions iroh-router/examples/custom-protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
//!
//! That's it! Follow along in the code below, we added a bunch of comments to explain things.

#![allow(deprecated)]

use std::{collections::BTreeSet, sync::Arc};

use anyhow::Result;
Expand Down
2 changes: 2 additions & 0 deletions iroh-router/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(deprecated)]

mod protocol;
mod router;

Expand Down
Loading