rsdns 0.1.0

DNS Client Library
Documentation

rsdns - DNS Client Library

rsnds is a Rust lib crate implementing a DNS Stub Resolver (RFC 1034).

rsdns strives to be simple and fast. To be simple rsdns keeps a minimal API. To be fast rsdns aims to allow DNS message parsing with zero memory allocations at runtime.

There are DNS crates which implement asynchronous resolvers, but are built for a single async runtime. This somewhat blocks usage of such resolver in an application built around another runtime. rsdns closes this gap and genuinely supports three different async runtimes. Moreover, for completeness, rsdns has an independent synchronous resolver as well.

Notable Features

  • Minimal API
  • Asynchronous resolvers for tokio, async-std and smol
  • Blocking resolver implemented on top of std::net
  • Zero memory allocations when parsing records with no variable size fields
  • Sockets can be bound to network interfaces by name (available on operating systems with SO_BINDTODEVICE support)
  • Minimal set of dependencies

Supported RFCs

rsdns focuses on querying the Domain Name System and strives to support all essential data-type records.

  • RFC 1035 - the foundation of DNS protocol: A, NS, TXT, CNAME, SOA, MX, PTR, ANY etc.
  • RFC 3596 - AAAA

Roadmap

The following is a short list of features planned for the near future.

  • Zero memory allocation for all essential data-types records
  • EDNS0 RFC 6891 - support UDP messages longer than 512 bytes

License

Licensed under either of

at your option.

Contribution

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.