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

Introduce a new base module #469

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Introduce a new base module #469

wants to merge 18 commits into from

Conversation

bal-e
Copy link
Contributor

@bal-e bal-e commented Dec 12, 2024

This introduces a new_base module as a potential candidate for replacing base. While it has a similar structure (although much is left to be filled out), it has three distinguishing features:

  1. It builds the foundation for a derive-based interface for easily and efficiently parsing (and possibly building) DNS messages.

  2. It introduces RevName, a more efficient type for domain names (where labels are stored in reverse order).

  3. It relies on the zerocopy crate to offload basic byte parsing, and to represent big-endian integers where necessary. This saves a fair amount of parsing code.

There's a lot more work to be done:

  • Define some record data types (probably those from RFC1035).
  • Define the OPT record data, and some EDNS option types.
  • Define some common message structures (including a generic fallback).
  • Update existing parts of the codebase to show the PR's benefits.
    • The client transports (... while remaining compatible?).
    • The stub resolver.
  • Try defining some derive macros for the parsing/building traits.

@bal-e bal-e self-assigned this Dec 16, 2024
@bal-e bal-e added the breaking A PR that includes a breaking change. label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A PR that includes a breaking change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant