[package] name = "if-watch" version = "3.2.0" authors = ["David Craven ", "Parity Technologies Limited "] edition = "2021" keywords = ["asynchronous", "routing"] license = "MIT OR Apache-2.0" description = "crossplatform asynchronous network watcher" repository = "https://github.com/mxinden/if-watch" [lib] crate-type = ["cdylib", "lib"] [features] tokio = ["dep:tokio", "rtnetlink/tokio_socket"] smol = ["dep:smol", "rtnetlink/smol_socket"] [dependencies] fnv = "1.0.7" futures = "0.3.19" ipnet = "2.3.1" log = "0.4.14" [target.'cfg(target_os = "linux")'.dependencies] rtnetlink = { version = "0.10.0", default-features = false } [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] core-foundation = "0.9.2" if-addrs = "0.10.0" system-configuration = "0.5.0" tokio = { version = "1.21.2", features = ["rt"], optional = true } smol = { version = "1.2.5", optional = true } [target.'cfg(target_os = "windows")'.dependencies] if-addrs = "0.10.0" windows = { version = "0.51.0", features = ["Win32_NetworkManagement_IpHelper", "Win32_Foundation", "Win32_NetworkManagement_Ndis", "Win32_Networking_WinSock"] } [target.'cfg(not(any(target_os = "ios", target_os = "linux", target_os = "macos", target_os = "windows")))'.dependencies] async-io = "2.0.0" if-addrs = "0.10.0" [dev-dependencies] env_logger = "0.10.0" smol = "1.2.5" tokio = { version = "1.21.2", features = ["rt", "macros"] } [[example]] name = "if_watch" required-features = ["smol"]