[package]
name = "cyber-radio-netwatch"
version = "0.1.0"
readme = "README.md"
description = "Cross-platform monitoring for network interface changes"
license = "MIT OR Apache-2.0"
authors = ["n0 team"]
repository = "https://github.com/n0-computer/net-tools"
keywords = ["networking", "interfaces"]
edition = "2024"
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.89"
[lints]
workspace = true
[dependencies]
atomic-waker = "1.1.2"
bytes = "1.7"
n0-error = "0.1.2"
n0-future = "0.3.1"
n0-watcher = "0.6.0"
pin-project-lite = "0.2.16"
time = "0.3.44"
tokio = { version = "1", features = [
"io-util",
"macros",
"sync",
"time",
] }
tokio-util = { version = "0.7", features = ["rt"] }
tracing = "0.1"
# non-browser dependencies
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies]
quinn-udp = { package = "cyber-radio-quinn-udp", version = "0.1", path = "../../quinn/quinn-udp" }
libc = "0.2.139"
netdev = "0.40.0"
socket2 = { version = "0.6", features = ["all"] }
tokio = { version = "1", features = [
"io-util",
"macros",
"sync",
"rt",
"net",
"fs",
"io-std",
"signal",
"process",
"time",
] }
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
# msrv fix
objc2-core-foundation = "0.3.2"
objc2-system-configuration = "0.3.2"
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
netlink-packet-route = "0.28.0"
netlink-packet-core = "0.8.1"
netlink-proto = "0.12.0"
netlink-sys = "0.8.7"
[target.'cfg(target_os = "android")'.dependencies]
derive_more = { version = "2.0.1", features = ["display"] }
[target.'cfg(target_os = "windows")'.dependencies]
wmi = "0.18"
windows = { version = "0.62.2", features = ["Win32_NetworkManagement_IpHelper", "Win32_Foundation", "Win32_NetworkManagement_Ndis", "Win32_Networking_WinSock"] }
windows-result = "0.4"
serde = { version = "1", features = ["derive"] }
derive_more = { version = "2.1", features = ["debug"] }
# wasm-in-browser dependencies
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies]
derive_more = { version = "2.1", features = ["display"] }
js-sys = "0.3.83"
web-sys = { version = "0.3.83", features = ["EventListener", "EventTarget"] }
[dev-dependencies]
testresult = "0.4.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# *non*-wasm-in-browser test/dev dependencies
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dev-dependencies]
tokio = { version = "1", features = [
"io-util",
"sync",
"rt",
"net",
"fs",
"macros",
"time",
"test-util",
] }
# wasm-in-browser test/dev dependencies
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dev-dependencies]
wasm-bindgen-test = "0.3"
wasm-tracing = "2.1.0"
[build-dependencies]
cfg_aliases = { version = "0.2.1" }
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "iroh_docsrs"]
[lib]
name = "netwatch"