[GH-ISSUE #551] code size #530

Closed
opened 2026-03-15 22:58:43 +03:00 by kerem · 5 comments
Owner

Originally created by @aep on GitHub (Aug 22, 2018).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/551

any chance to make idna and url optional dependencies? it's fairly large

Originally created by @aep on GitHub (Aug 22, 2018). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/551 any chance to make idna and url optional dependencies? it's fairly large
kerem 2026-03-15 22:58:43 +03:00
Author
Owner

@bluejekyll commented on GitHub (Aug 23, 2018):

I think we could do this. It would mean losing some validation and conversion of international names, and limit us to ascii only name interfaces. I believe it's only in place during Name parsing and Name conversion to Strings.

Basically we could default it to on, and make it optional, then feature flag off the methods that require it.

I think we'd lose these methods when it's not enabled:

https://github.com/bluejekyll/trust-dns/blob/master/proto/src/rr/domain/label.rs#L45
https://github.com/bluejekyll/trust-dns/blob/master/proto/src/rr/domain/label.rs#L139
https://github.com/bluejekyll/trust-dns/blob/master/proto/src/rr/domain/name.rs#L412

And we'd need to limit the Display implementation to remove the condition on internationalization:

https://github.com/bluejekyll/trust-dns/blob/master/proto/src/rr/domain/label.rs#L218-L238

And then make this struct feature flagged off as well:

https://github.com/bluejekyll/trust-dns/blob/master/proto/src/rr/domain/name.rs#L736

I think that's all the places where IDNA is in use.

<!-- gh-comment-id:415226669 --> @bluejekyll commented on GitHub (Aug 23, 2018): I think we could do this. It would mean losing some validation and conversion of international names, and limit us to ascii only name interfaces. I believe it's only in place during Name parsing and Name conversion to Strings. Basically we could default it to on, and make it optional, then feature flag off the methods that require it. I think we'd lose these methods when it's not enabled: https://github.com/bluejekyll/trust-dns/blob/master/proto/src/rr/domain/label.rs#L45 https://github.com/bluejekyll/trust-dns/blob/master/proto/src/rr/domain/label.rs#L139 https://github.com/bluejekyll/trust-dns/blob/master/proto/src/rr/domain/name.rs#L412 And we'd need to limit the Display implementation to remove the condition on internationalization: https://github.com/bluejekyll/trust-dns/blob/master/proto/src/rr/domain/label.rs#L218-L238 And then make this struct feature flagged off as well: https://github.com/bluejekyll/trust-dns/blob/master/proto/src/rr/domain/name.rs#L736 I think that's all the places where IDNA is in use.
Author
Owner

@aep commented on GitHub (Nov 21, 2018):

thanks so much. i'm rewriting carrier now to replace tokio with mio.

Any chance to put only the dns parser into a separate crate?
trust-dns-proto depends on tokio unfortunately

<!-- gh-comment-id:440761439 --> @aep commented on GitHub (Nov 21, 2018): thanks so much. i'm rewriting carrier now to replace tokio with mio. Any chance to put only the dns parser into a separate crate? trust-dns-proto depends on tokio unfortunately
Author
Owner

@bluejekyll commented on GitHub (Nov 22, 2018):

Any chance to put only the dns parser into a separate crate?

I’ve considered it in the past, but haven’t had a need to do so. The project already has so many crates! For some reason I hesitate to add more...

<!-- gh-comment-id:441097948 --> @bluejekyll commented on GitHub (Nov 22, 2018): > Any chance to put only the dns parser into a separate crate? I’ve considered it in the past, but haven’t had a need to do so. The project already has so many crates! For some reason I hesitate to add more...
Author
Owner

@aep commented on GitHub (Jan 5, 2019):

no longer relevant, i wrote my own dns. should we close?

<!-- gh-comment-id:451686577 --> @aep commented on GitHub (Jan 5, 2019): no longer relevant, i wrote my own dns. should we close?
Author
Owner

@bluejekyll commented on GitHub (Jan 6, 2019):

Eventually I want to rework the library to be generic over futures based implementations, but yes, this we can close.

<!-- gh-comment-id:451752188 --> @bluejekyll commented on GitHub (Jan 6, 2019): Eventually I want to rework the library to be generic over futures based implementations, but yes, this we can close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#530
No description provided.