async-dns

This crate provides asynchronous DNS lookups.

In asynchronous Rust code, it is necessary to resolve URL names using DNS. In most cases, this is done by calling [getaddrinfo] on a blocking threadpool. However, since DNS is a UDP-based protocol, it doesn't make much sense to block on a thread when fully asynchronous options are available.

This crate provides a fully asynchronous alternative, based on the following mechanisms:

It returns the list of addresses that it found to be associated with the given name.

License

Dual licensed under the MIT and Apache 2.0 licenses.