[package] name = "cotton-netif" version = "0.0.5" description = "Enumerating available network interfaces and their IP addresses" homepage = "https://github.com/pdh11/cotton" repository = "https://github.com/pdh11/cotton" categories = ["network-programming"] authors = ["Peter Hartley "] edition = "2021" license = "CC0-1.0" rust-version = "1.75" [package.metadata.docs.rs] all-features = true [[example]] name = "netif-monitor" required-features = ["std", "async", "sync"] doc-scrape-examples = true [dependencies] no-std-net = { version = "0.6", default-features = false } [target.'cfg(target_os = "linux")'.dependencies] neli = { version = "0.6.1", default-features = false, features = [ "async", ], optional = true } [target.'cfg(not(target_os = "none"))'.dependencies] tokio = { version = "1.24", default-features = false, features = [ "macros", "sync", "rt", ], optional = true } tokio-test = { version = "0.4", default-features = false, optional = true } futures-util = { version = "0.3", default-features = false, features = [ "async-await", "async-await-macro", ], optional = true } async-stream = { version = "0.3.1", default-features = false, optional = true } nix = { version = "0.29", default-features = false, features = [ "net", ], optional = true } libc = { version = "0.2.155", default-features = false, optional = true } [features] default = ["std", "async", "sync"] std = ["no-std-net/std"] async = [ "std", "dep:tokio", "dep:futures-util", "dep:async-stream", "dep:tokio-test", "dep:neli", "dep:nix", ] sync = ["std", "dep:nix", "dep:libc"]