Announcing `async-dns`

82 points EelRemoval

https://github.com/notgull/async-dns

The DNS implementation found in libc is synchronous, meaning that in order to use it in asynchronous code it needs to be moved to a blocking threadpool. Both tokio and async-std use this strategy. The goal of this crate is to actually preform DNS asynchronously, without needing a blocking threadpool at all (aside from for file operations).

There's still some optimizations that need to be made (more things could be cached, for instance), but aside from that I think this crate should fulfill your asynchronous DNS needs.

I also created a dns-protocol crate that implements DNS in a sans-I/O way, which is used in async-dns. It may be useful for other implementations of DNS. See here: https://crates.io/crates/dns-protocol