Skip to content

Conversation

@Frando
Copy link
Member

@Frando Frando commented Feb 6, 2026

Description

We currently only export some types from iroh_relay::dns as iroh::dns. This means if you actually want to customize the DNS resolver you have to add a dependency on iroh_relay to your crate, because several of the types needed are currently not exported from iroh.

This fixes it by reexporting the whole iroh_relay::dns module as iroh::dns.

Also fixes a few doccomments.

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
    • 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:

@Frando Frando requested a review from dignifiedquire February 6, 2026 11:34
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

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

Last updated: 2026-02-09T15:02:31Z

@n0bot n0bot bot added this to iroh Feb 6, 2026
@github-project-automation github-project-automation bot moved this to 🚑 Needs Triage in iroh Feb 6, 2026
iroh/src/dns.rs Outdated
pub use iroh_relay::dns::{
DnsResolver, N0_DNS_ENDPOINT_ORIGIN_PROD, N0_DNS_ENDPOINT_ORIGIN_STAGING,
};
pub use iroh_relay::dns::*;
Copy link
Contributor

Choose a reason for hiding this comment

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

I am sceptical of glob exports, how much would it be to make these explicit?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can, it's just that we had this in the past and then forgot to update it when we added a new type in iroh_relay::dns that was used in a method of Resolver. So to prevent that I'd prefer a glob export. Or even just reexport the module?

Copy link
Member Author

Choose a reason for hiding this comment

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

We could just reexport the module and move the tests somewhere else.

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe cc @ramfox who thought about exports the most

Copy link
Member Author

Choose a reason for hiding this comment

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

I pushed a commit that fully reexports the dns module. I think this is much cleaner.

@Frando Frando requested review from ramfox February 9, 2026 15:00
@dignifiedquire dignifiedquire moved this from 🚑 Needs Triage to 👀 In review in iroh Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

2 participants