[package]
name = "domain"
version = "0.6.0"
edition = "2018"
authors = ["Martin Hoffmann <martin@nlnetlabs.nl>"]
description = "A DNS library for Rust."
documentation = "https://docs.rs/domain"
homepage = "https://github.com/nlnetlabs/domain/"
repository = "https://github.com/nlnetlabs/domain/"
readme = "README.md"
keywords = ["DNS", "domain"]
license = "BSD-3-Clause"

[lib]
name = "domain"
path = "src/lib.rs"

[dependencies]
rand           = "0.8"

bytes          = { version = "1.0", optional = true }
chrono         = { version = "0.4.6", optional = true }
futures        = { version = "0.3", optional = true }
#openssl       = { version = "0.10", optional = true }
ring           = { version = "0.16.14", optional = true }
smallvec       = { version = "1.0", optional = true }
tokio          = { version = "1.0", optional = true, features = ["io-util", "macros", "net", "time"] }

[target.'cfg(macos)'.dependencies]
# specifying this overrides minimum-version mio's 0.2.69 libc dependency, which allows the build to work
libc = { version = "0.2.71", default-features = false, optional = true }

[features]
# If you add a feature here, also add it to .github/workflows/ci.yml for the
# cargo test run. Only interop must not be present.
default     = ["std"]
interop     = ["bytes", "ring"]
master      = ["std", "bytes", "chrono"]
resolv      = ["bytes", "futures", "smallvec", "std", "tokio", "libc"]
resolv-sync = ["resolv", "tokio/rt"]
sign        = ["std"]
std         = []
tsig        = ["bytes", "ring", "smallvec"]
validate    = ["std", "ring"]

[dev-dependencies]
tokio-native-tls   = "0.3"
tokio              = { version = "1", features = ["rt-multi-thread", "io-util", "net"] }

[[example]]
name = "readzone"
required-features = ["master"]

[[example]]
name = "download-rust-lang"
required-features = ["resolv"]

[[example]]
name = "lookup"
required-features = ["resolv"]

[[example]]
name = "resolv-sync"
required-features = ["resolv-sync"]

