README.md (2997B)
1 # `ascii_domain` 2 3 [<img alt="git" src="https://git.philomathiclife.com/badges/ascii_domain.svg" height="20">](https://git.philomathiclife.com/ascii_domain/log.html) 4 [<img alt="crates.io" src="https://img.shields.io/crates/v/ascii_domain.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](https://crates.io/crates/ascii_domain) 5 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-ascii_domain-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" height="20">](https://docs.rs/ascii_domain/latest/ascii_domain/) 6 7 `ascii_domain` is a library for efficiently parsing domains based on a supplied ASCII character set one wants to 8 enforce each `Label` to conform to. The primary type in the library is `Domain` which can be thought of as a domain 9 in _representation_ format. Technically since any ASCII `u8` except `b'.'` is allowed in a `Label`, it is more 10 general than an actual representation format that doesn't include some form of escape characters. For a 11 full-fledged DNS library look elsewhere (e.g., [`domain`](https://docs.rs/domain/latest/domain/)). 12 13 The purpose of this library is to allow efficient customization of domain name parsing while still retaining 14 the hierarchical structure of a domain. Depending on one’s use case, allowed formats and characters can 15 differ. If one wants to conform to the [Domain Name System (DNS)](https://www.rfc-editor.org/rfc/rfc2181), 16 all octets are allowed; but conforming to [RFC 1123](https://www.rfc-editor.org/rfc/rfc1123) or 17 [RFC 5891](https://datatracker.ietf.org/doc/html/rfc5891) requires stricter formats and a reduced character 18 set. 19 20 ## Minimum Supported Rust Version (MSRV) 21 22 This will frequently be updated to be the same as stable. Specifically, any time stable is updated and that 23 update has "useful" features or compilation no longer succeeds (e.g., due to new compiler lints), then MSRV 24 will be updated. 25 26 MSRV changes will correspond to a SemVer patch version bump pre-`1.0.0`; otherwise a minor version bump. 27 28 ## SemVer Policy 29 30 * All on-by-default features of this library are covered by SemVer 31 * MSRV is considered exempt from SemVer as noted above 32 33 ## License 34 35 Licensed under either of 36 37 * Apache License, Version 2.0 ([LICENSE-APACHE](https://www.apache.org/licenses/LICENSE-2.0)) 38 * MIT license ([LICENSE-MIT](https://opensource.org/licenses/MIT)) 39 40 at your option. 41 42 ## Contribution 43 44 Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, 45 as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. 46 47 Before any PR is sent, `cargo clippy` and `cargo t` should be run for both `--no-default-features` and 48 `--all-features`. Additionally `RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features` should be run to 49 ensure documentation can be built. 50 51 ### Status 52 53 The crate is only tested on the `x86_64-unknown-linux-gnu` and `x86_64-unknown-openbsd` targets, but 54 it should work on any platform.