Tracking issue to check / remove / review which items from foreign crates we expose in the public APIs of the iroh crates.
Each foreign item in the public API means that we cannot do a semver-breaking update of that crate during 1.0, so we should keep this list as small as possible.
There's a tool called cargo-check-external-types which produces a list of foreign types that are used in public APIs.
List of PRs to reduce surface
Remaining items
With all the above PRs merged and the external_types.toml config below, only these items remain that we should discuss:
iroh-base
empty 🥇
iroh-dns
empty 🥇
iroh-dns-server
empty 🥇
iroh
empty 🥇
iroh-relay
empty 🥇
External types
Here's the external-types.toml config that I'm using to produce the above list.
allowed_external_types = [
# workspace crates
"iroh_base::*",
"iroh_dns::*",
"iroh_relay::*",
# 1.0 crates that we deem fine to be part of the public API
"bytes::*",
"http::*",
"http_body::*",
"hyper::*",
"rustls_pki_types::*",
"serde::*",
"serde_core::*",
"tokio::*",
"url::*",
# crates owned by us that will move to 1.0 as well
"iroh_metrics::*",
"n0_error::*",
"n0_watcher::*",
"noq::*",
"noq_proto::*",
"noq_udp::*",
"portmapper::metrics::Metrics",
# non-1.0 crates that we decided to accept in the public API
"rustls::*",
"tokio_rustls::*",
"futures_core::stream::Stream",
"futures_sink::Sink",
# these are only type aliases
"futures_lite::future::Boxed",
"futures_lite::stream::Boxed",
]
Tracking issue to check / remove / review which items from foreign crates we expose in the public APIs of the iroh crates.
Each foreign item in the public API means that we cannot do a semver-breaking update of that crate during 1.0, so we should keep this list as small as possible.
There's a tool called
cargo-check-external-typeswhich produces a list of foreign types that are used in public APIs.List of PRs to reduce surface
ipnet,hickory_netandnetmonfrom public API surface by replacing their errors with variants or AnyError #4155rustls_cert_reloadable_resolverfrom public API #4157http_body_utilandtokio_utilfrom public API surface #4162tokio-rustls-acmein public API #4166Remaining items
With all the above PRs merged and the
external_types.tomlconfig below, only these items remain that we should discuss:iroh-base
empty 🥇
iroh-dns
empty 🥇
iroh-dns-server
empty 🥇
iroh
empty 🥇
iroh-relay
empty 🥇
External types
Here's the
external-types.tomlconfig that I'm using to produce the above list.