[package]
name = "hickory-proto"

# 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 library. This is the foundational DNS protocol library for all Hickory DNS projects.
"""

# These URLs point to more information about the repository
documentation = "https://docs.rs/hickory-proto"

# This points to a file in the repository (relative to this Cargo.toml). The
# contents of this file are stored and indexed in the registry.
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]
dns-over-tls = []
dns-over-rustls = [
    "dns-over-tls",
    "rustls",
    "rustls-pemfile",
    "tokio-rustls",
    "tokio-runtime",
]
dns-over-native-tls = [
    "dns-over-tls",
    "native-tls",
    "tokio-native-tls",
    "tokio-runtime",
]
dns-over-openssl = ["dns-over-tls", "openssl", "tokio-openssl", "tokio-runtime"]

dns-over-https-rustls = ["dns-over-https"]
dns-over-https = ["bytes", "h2", "http", "dns-over-rustls", "tokio-runtime"]
dns-over-quic = [
    "quinn",
    "rustls/quic",
    "dns-over-rustls",
    "bytes",
    "tokio-runtime",
]
dns-over-h3 = ["h3", "h3-quinn", "quinn", "http", "dns-over-quic"]

native-certs = ["dep:rustls-native-certs"]
dnssec = ["bitflags"]

dnssec-openssl = ["dnssec", "openssl"]
dnssec-ring = ["dnssec", "ring"]
testing = []

text-parsing = []
tokio-runtime = ["tokio/net", "tokio/rt", "tokio/time", "tokio/rt-multi-thread"]
default = ["tokio-runtime"]

serde-config = ["serde", "url/serde"]

# enables experimental the mDNS (multicast) feature
mdns = ["socket2/all"]

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

wasm-bindgen = ["wasm-bindgen-crate", "js-sys"]

backtrace = ["dep:backtrace"]

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

[dependencies]
async-recursion.workspace = true
async-trait.workspace = true
backtrace = { workspace = true, optional = true }
bitflags = { workspace = true, optional = true }
bytes = { workspace = true, optional = true }
cfg-if.workspace = true
data-encoding.workspace = true
enum-as-inner.workspace = true
futures-channel = { workspace = true, default-features = false, features = [
    "std",
] }
futures-io = { workspace = true, default-features = false, features = ["std"] }
futures-util = { workspace = true, default-features = false, features = [
    "std",
] }
h2 = { workspace = true, features = ["stream"], optional = true }
h3 = { workspace = true, optional = true }
h3-quinn = { workspace = true, optional = true }
http = { workspace = true, optional = true }
idna.workspace = true
ipnet.workspace = true
js-sys = { workspace = true, optional = true }
native-tls = { workspace = true, optional = true }
once_cell.workspace = true
openssl = { workspace = true, features = ["v102", "v110"], optional = true }
quinn = { workspace = true, optional = true, features = [
    "log",
    "runtime-tokio",
    "tls-rustls",
] }
rand.workspace = true
ring = { workspace = true, optional = true, features = ["std"] }
rustls = { workspace = true, optional = true }
rustls-native-certs = { workspace = true, optional = true }
rustls-pemfile = { workspace = true, optional = true }
serde = { workspace = true, features = ["derive"], optional = true }
socket2 = { workspace = true, optional = true }
thiserror.workspace = true
tinyvec = { workspace = true, features = ["alloc"] }
tracing.workspace = true
tokio = { workspace = true, features = ["io-util"], optional = true }
tokio-native-tls = { workspace = true, optional = true }
tokio-openssl = { workspace = true, optional = true }
tokio-rustls = { workspace = true, optional = true, features = ["early-data"] }
url.workspace = true
wasm-bindgen-crate = { workspace = true, optional = true }
webpki-roots = { workspace = true, optional = true }

[dev-dependencies]
futures-executor = { workspace = true, default-features = false, features = [
    "std",
] }
openssl = { workspace = true, features = ["v102", "v110"] }
tokio = { workspace = true, features = ["rt", "time", "macros"] }
tracing-subscriber = { workspace = true, features = [
    "std",
    "fmt",
    "env-filter",
] }

[package.metadata.docs.rs]
all-features = true
default-target = "x86_64-unknown-linux-gnu"
targets = ["x86_64-apple-darwin", "x86_64-pc-windows-msvc"]
rustdoc-args = ["--cfg", "docsrs"]
