domain

A DNS library for Rust.

Travis Build Status AppVeyor Build
Status Current

Documentation

Is It Alive?

Yes! After pondering for a while how best to deal with all the types containing [u8]s in a zero-cost way and trying out a few options, I am currently moving the bits module to be entirely based on bytes::Bytes. This happens in the bytes-for-slices branch.

Once that is done, I am planning to simplify the resolver quite a bit. In order to avoid having to redo that again after the upcoming Tokio restructuring, this will wait until after the dust there has settled a bit.

As these are all very breaking changes, this will result in version 0.3.0.

Usage

First, add this to your Cargo.toml:

toml [dependencies] domain = "0.2"

Then, add this to your crate root:

rust extern crate domain;

Note: The resolver that is part of this crate only does DNS lookups. If you want to perform lookups according to the system’s configuration, including things such as looking at the local hosts file, consider using the netdb crate instead.

Features (aka TODO)

Eventually, this crate will provide the following functions:

The idea for both the recursive resolver and the authoritative name server currently is to supply libraries that allow including this functionality in programs instead of building general purpose products. We may split the four top-level points into separate crates along the way.

Help!

The stub resolver currently is of limited use under Windows since I have no idea what the correct way to determine the system’s resolver configuration is. I would be very grateful for a hint as to that, so the crate becomes properly cross platform.

Contributing

If you have comments, proposed changes, or would like to contribute, please open an issue.

Licensing

domain is distributed under the terms of the MIT license. See LICENSE for details.