#domain-name #character-set #domain #ascii #dns #validation

no-std ascii_domain

Parser for DNS names based on a provided ASCII character set

8 releases (5 breaking)

0.6.1 Mar 27, 2024
0.6.0 Feb 14, 2024
0.5.0 Feb 11, 2024
0.4.0 Feb 8, 2024
0.1.0 Feb 4, 2024

#952 in Parser implementations

Download history 21/week @ 2024-02-05 43/week @ 2024-02-12 28/week @ 2024-02-19 3/week @ 2024-02-26 17/week @ 2024-03-11 141/week @ 2024-03-25 33/week @ 2024-04-01

191 downloads per month
Used in rpz

MIT/Apache

115KB
2K SLoC

ascii_domain

ascii_domain is a library for efficiently parsing domains based on a supplied ASCII character set one wants to enforce each Label to conform to. The primary type in the library is Domain which can be thought of as domains in representation format. Technically since any ASCII u8 except b'.' is allowed in a Label, it is more general than an actual representation format that doesn’t include some form of escape characters. For a full-fledged DNS library look elsewhere (e.g., domain).

The purpose of this library is to allow efficient customization of domain name parsing while still retaining the hierarchical structure of a domain. Depending on one’s use case, allowed formats and characters can differ. If one wants to conform to the Domain Name System (DNS), all octets are allowed; but conforming to RFC 1123 or RFC 5891 requires stricter formats and a reduced character set.

Status

This package is actively maintained.

The crate is only tested on the x86_64-unknown-linux-gnu and x86_64-unknown-openbsd targets, but it should work on any platform.

Dependencies

~185KB