[package]
name = "setdns"
version = "0.1.1"
edition = "2024"
license = "MIT"
description = "Temporarily apply and restore system DNS configuration, including global and split DNS."
repository = "https://github.com/AsakuraMizu/setdns"
documentation = "https://docs.rs/setdns"
readme = "README.md"
keywords = ["dns", "resolver", "split-dns", "systemd-resolved", "nrpt"]
categories = ["network-programming", "os"]
exclude = ["/test-runner", "/AGENTS.md"]

[dependencies]
addr = { version = "0.15", default-features = false, features = ["std"] }
base64 = "0.22"
log = "0.4"
thiserror = "2"

[target.'cfg(target_os = "linux")'.dependencies]
libc = "0.2"
serde = { version = "1", default-features = false }
zbus = { version = "5", default-features = false, features = ["async-io", "blocking-api"] }

[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = "0.9"
core-foundation-sys = "0.8"
system-configuration = "0.7"
system-configuration-sys = "0.6"

[target.'cfg(target_os = "windows")'.dependencies]
libloading = "0.8"
windows = { version = "0.62.2", features = ["Win32_Foundation", "Win32_NetworkManagement_IpHelper", "Win32_NetworkManagement_Ndis", "Win32_System_Com"] }
windows-registry = "0.6"