Crates.io | ascii_domain |
lib.rs | ascii_domain |
version | 0.6.6 |
created_at | 2024-02-04 00:06:20.092946+00 |
updated_at | 2025-08-26 14:22:36.830395+00 |
description | Parser for DNS names based on a provided ASCII character set. |
homepage | |
repository | https://git.philomathiclife.com/repos/ascii_domain/ |
max_upload_size | |
id | 1125761 |
size | 136,485 |
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 a domain
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.
This will frequently be updated to be the same as stable. Specifically, any time stable is updated and that update has "useful" features or compilation no longer succeeds (e.g., due to new compiler lints), then MSRV will be updated.
MSRV changes will correspond to a SemVer patch version bump pre-1.0.0
; otherwise a minor version bump.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Before any PR is sent, cargo clippy
and cargo t
should be run for both --no-default-features
and
--all-features
. Additionally RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
should be run to
ensure documentation can be built.
The crate is only tested on the x86_64-unknown-linux-gnu
, x86_64-unknown-openbsd
, and aarch64-apple-darwin
targets; but it should work on most platforms.