21 releases (breaking)

0.17.0 Jan 19, 2024
0.16.0 Oct 21, 2023
0.15.0 Apr 8, 2023
0.14.0 Dec 23, 2022
0.11.1 Nov 20, 2021

#826 in Network programming

Download history 140/week @ 2024-02-26 274/week @ 2024-03-04 90/week @ 2024-03-11 71/week @ 2024-03-18 708/week @ 2024-03-25 140/week @ 2024-04-01 73/week @ 2024-04-08 67/week @ 2024-04-15 66/week @ 2024-04-22 107/week @ 2024-04-29 76/week @ 2024-05-06 73/week @ 2024-05-13 81/week @ 2024-05-20 87/week @ 2024-05-27 50/week @ 2024-06-03 85/week @ 2024-06-10

343 downloads per month
Used in ch4


6.5K SLoC

rsdns - DNS Client Library

rsdns is a Rust library for interacting with DNS servers.

Its main goal is to query the Domain Name System and return the results in easily consumable Rust types.

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 minimal overhead.

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

crates.io docs.rs

Notable Features

  • Minimal API
  • Asynchronous DNS clients for tokio, async-std and smol
  • Blocking client implemented with 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


rsdns comes with a small command-line tool ch4. ch4 uses rsdns to query the Domain Name System, and shows the results in a zone-file format. It can be used as a simple substitute for dig, especially on platforms where dig is not originally supported.

Supported RFCs


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


The changelog is maintained in CHANGELOG.md


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.


~173K SLoC