[package]
name = "hickory-dns"

# A short blurb about the package. This is not rendered in any format when
# uploaded to crates.io (aka this is not markdown)
description = """
Hickory DNS is a safe and secure DNS server with DNSSEC support.
 Eventually this could be a replacement for BIND9. The DNSSEC support allows
 for live signing of all records, in it does not currently support
 records signed offline. The server supports dynamic DNS with SIG0 authenticated
 requests. Hickory DNS is based on the Tokio and Futures libraries, which means
 it should be easily integrated into other software that also use those
 libraries.
"""

documentation = "https://docs.rs/hickory-dns"
readme = "README.md"

version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
homepage.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
license.workspace = true

[badges]
#github-actions = { repository = "bluejekyll/hickory", branch = "main", workflow = "test" }
codecov = { repository = "hickory-dns/hickory-dns", branch = "main", service = "github" }
maintenance = { status = "actively-developed" }

[features]
default = ["sqlite", "resolver", "native-certs", "ascii-art"]

# if enabled, the hickory-dns binary will print ascii-art on start, disable to reduce the binary size
ascii-art = []

dnssec-openssl = [
    "dnssec",
    "hickory-client/dnssec-openssl",
    "hickory-proto/dnssec-openssl",
    "hickory-server/dnssec-openssl",
]
dnssec-ring = [
    "dnssec",
    "hickory-client/dnssec-ring",
    "hickory-proto/dnssec-ring",
    "hickory-server/dnssec-ring",
]
dnssec = []
recursor = ["hickory-server/recursor"]
# Recursive Resolution is Experimental!
resolver = ["hickory-server/resolver"]
sqlite = ["hickory-server/sqlite"]

# TODO: Need to figure out how to be consistent with ring/openssl usage...
# dns-over-https-openssl = ["dns-over-openssl", "hickory-client/dns-over-https-openssl", "dns-over-https"]
dns-over-https-rustls = [
    "dns-over-https",
    "dns-over-rustls",
    "hickory-proto/dns-over-https-rustls",
    "hickory-client/dns-over-https-rustls",
    "hickory-server/dns-over-https-rustls",
]
dns-over-https = ["hickory-server/dns-over-https"]
dns-over-quic = ["dns-over-rustls", "hickory-server/dns-over-quic"]
dns-over-h3 = ["dns-over-rustls", "hickory-server/dns-over-h3"]

# TODO: migrate all tls and tls-openssl features to dns-over-tls, et al
dns-over-openssl = [
    "dns-over-tls",
    "dnssec-openssl",
    "hickory-proto/dns-over-openssl",
    "hickory-client/dns-over-openssl",
    "hickory-server/dns-over-openssl",
]
dns-over-rustls = [
    "dns-over-tls",
    "dnssec-ring",
    "rustls",
    "hickory-proto/dns-over-rustls",
    "hickory-client/dns-over-rustls",
    "hickory-server/dns-over-rustls",
]
dns-over-tls = []

# This is a deprecated feature...
tls-openssl = ["dns-over-openssl"]
tls = ["dns-over-openssl"]

# WARNING: there is a bug in the mutual tls auth code at the moment see issue #100
# mtls = ["hickory-client/mtls"]

webpki-roots = ["hickory-client/webpki-roots", "hickory-server/webpki-roots"]
native-certs = ["hickory-client/native-certs", "hickory-server/native-certs"]

[[bin]]
name = "hickory-dns"
path = "src/hickory-dns.rs"

[dependencies]
# clap features:
# - suggestion for advanced help with error in cli
# - derive for clap derive api
# - help to generate --help
clap = { workspace = true, default-features = false, features = [
    "std",
    "cargo",
    "help",
    "derive",
    "suggestions",
] }
futures-util = { workspace = true, default-features = false, features = [
    "std",
] }
rustls = { workspace = true, optional = true }
time.workspace = true
tracing.workspace = true
tracing-subscriber = { workspace = true, features = [
    "std",
    "fmt",
    "env-filter",
] }
tokio = { workspace = true, features = ["time", "rt"] }
hickory-client.workspace = true
hickory-proto.workspace = true
hickory-server = { workspace = true, features = ["toml"] }

[dev-dependencies]
native-tls.workspace = true
regex.workspace = true
hickory-proto = { workspace = true, features = [
    "testing",
    "dns-over-native-tls",
] }
hickory-resolver.workspace = true
webpki-roots.workspace = true
