[package]
name = "dyns"
description = "DNS discovery and resolver support for DHTTP applications"
version = "0.5.0"
edition = "2024"
license = "Apache-2.0"
repository = "https://github.com/genmeta/ddns"
readme = "README.md"
keywords = ["dhttp", "dns", "mdns", "http3", "quic"]
categories = ["network-programming", "asynchronous"]
autoexamples = false
autobins = false

[lib]
name = "ddns"

[dependencies]
base64 = "0.22"
bitfield-struct = "0.13"
bytes = "1"
dashmap = { version = "6", optional = true }
dhttp-identity = "0.2.0"
dquic = "0.6.0"
flume = { version = "0.12", optional = true }
futures = "0.3"
libc = { version = "0.2", optional = true }
nom = "8"
rand = "0.10"
ring = "0.17"
rustls = { version = "0.23", default-features = false, features = [
    "logging",
    "ring",
] }
rustls-native-certs = { version = "0.8", optional = true }
rustls-pemfile = "2"
snafu = "0.9"
socket2 = { version = "0.6", features = ["all"], optional = true }
tokio = { version = "1", features = [
    "time",
    "macros",
    "net",
    "sync",
    "rt",
    "rt-multi-thread",
    "io-util",
] }
tracing = "0.1"
x509-parser = { version = "0.18", features = ["verify"] }

h3x = { version = "0.5.0", default-features = false, optional = true }
http = { version = "1", optional = true }
http-body = { version = "1", optional = true }
http-body-util = { version = "0.1", optional = true }
reqwest = { version = "0.13", default-features = false, features = [
    "charset",
    "http2",
    "json",
    "query",
    "rustls-no-provider",
    "system-proxy",
], optional = true }
url = { version = "2", optional = true }

[features]
default = []
resolvers = []
publishers = []
dquic-network = ["dep:h3x", "h3x/dquic"]
h3 = [
    "dep:dashmap",
    "dep:h3x",
    "h3x/hyper",
    "dep:http",
    "dep:http-body",
    "dep:http-body-util",
    "dep:url",
]
http = ["dep:dashmap", "dep:reqwest", "dep:rustls-native-certs"]
mdns = ["dep:dashmap", "dep:flume", "dep:libc", "dep:socket2"]

[dev-dependencies]
clap = { version = "4", features = ["derive"] }
h3x = { version = "0.5.0", default-features = false, features = ["dquic"] }
shellexpand = "3"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[[example]]
name = "mdns_discover"
path = "examples/mdns_discover.rs"
required-features = ["mdns"]

[[example]]
name = "mdns_query"
path = "examples/mdns_query.rs"
required-features = ["mdns"]

[[example]]
name = "publish"
path = "examples/publish.rs"
required-features = ["h3"]

[[example]]
name = "query"
path = "examples/query.rs"
required-features = ["h3"]
