Skip to content

refactor(iroh)!: Improve feature-gating for unstable-custom-transports#4228

Open
Frando wants to merge 5 commits intomainfrom
Frando/custom-transport-feature-flag-cleanup
Open

refactor(iroh)!: Improve feature-gating for unstable-custom-transports#4228
Frando wants to merge 5 commits intomainfrom
Frando/custom-transport-feature-flag-cleanup

Conversation

@Frando
Copy link
Copy Markdown
Member

@Frando Frando commented May 5, 2026

Description

Moves AddrKind and TransportBias which are part of the non-feature-gated API up to iroh::endpoint, and gate the whole iroh::endpoint::transports module behind the unstable-custom-transports

Breaking Changes

  • changed: iroh::Endpoint::transport_bias is now gated on the unstable-custom-transports feature
  • changed: iroh::endpoint::transports and its remaining items (Addr, Transmit, RecvInfo, CustomTransport, CustomEndpoint, CustomSender) are now only exported when the unstable-custom-transports feature is enabled.

Change checklist

  • Self-review.
  • All breaking changes documented.

@Frando Frando requested a review from rklaehn May 5, 2026 08:43
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/4228/docs/iroh/

Last updated: 2026-05-05T14:03:19Z

@n0bot n0bot Bot added this to iroh May 5, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh May 5, 2026
Comment thread iroh/src/endpoint.rs Outdated
kind: transports::AddrKind,
bias: transports::TransportBias,
) -> Self {
pub fn transport_bias(mut self, kind: AddrKind, bias: TransportBias) -> Self {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that this is a breaking change, but can we make this private unless the unstable-custom-transports feature is set? As far as I know that is the only place where it is used right now.

Basically if we ever wanted to have an even more flexible way to select paths, this opinionated way to select transports woudl get in the way.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed a commit that does this

Comment thread iroh/src/endpoint.rs

/// Types for defining custom transports
#[cfg(feature = "unstable-custom-transports")]
pub mod transports {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the entire transports module becomes gated, and we import the internal stuff directly? Nice!

@dignifiedquire dignifiedquire added this to the v1.0.0-rc.0 milestone May 5, 2026
@Frando Frando requested a review from rklaehn May 5, 2026 13:41
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: 0edecf4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚑 Needs Triage

Development

Successfully merging this pull request may close these issues.

3 participants