netdev 0.41.0

Cross-platform library for enumerating network interfaces with metadata.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "netdev"
version = "0.41.0"
authors = ["shellrow <shellrow@foctal.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Cross-platform library for enumerating network interfaces with metadata."
readme = "README.md"
keywords = ["network"]
categories = ["network-programming"]
license = "MIT"
repository = "https://github.com/shellrow/netdev"

[features]
default = ["gateway"]
gateway = []
serde = [
    "dep:serde",
    "mac-addr/serde",
    "ipnet/serde",
]

[lib]
name = "netdev"
path = "src/lib.rs"

[[example]]
name = "default_gateway"
path = "examples/default_gateway.rs"
required-features = ["gateway"]

[[example]]
name = "default_interface"
path = "examples/default_interface.rs"
required-features = ["gateway"]

[[example]]
name = "global_ips"
path = "examples/global_ips.rs"
required-features = ["gateway"]

[[example]]
name = "list_interfaces"
path = "examples/list_interfaces.rs"

[[example]]
name = "serialize"
path = "examples/serialize.rs"
required-features = [
    "serde",
    "gateway",
]

[[example]]
name = "stats"
path = "examples/stats.rs"
required-features = ["gateway"]

[dependencies.ipnet]
version = "2.12"

[dependencies.mac-addr]
version = "0.3"

[dependencies.serde]
version = "1"
features = ["derive"]
optional = true

[dev-dependencies.serde_json]
version = "1.0"

[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies.netlink-packet-core]
version = "0.8"

[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies.netlink-packet-route]
version = "0.29"

[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies.netlink-sys]
version = "0.8.8"

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.objc2-core-foundation]
version = "0.3"

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.objc2-system-configuration]
version = "0.3"
features = ["SCNetworkConfiguration"]

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.plist]
version = "1.8"

[target.'cfg(target_os = "android")'.dependencies.dlopen2]
version = "0.8.2"
default-features = false

[target.'cfg(target_os = "android")'.dependencies.once_cell]
version = "1"

[target.'cfg(target_os = "ios")'.dependencies.block2]
version = "0.6"

[target.'cfg(target_os = "ios")'.dependencies.dispatch2]
version = "0.3"

[target."cfg(unix)".dependencies.libc]
version = "0.2"

[target."cfg(windows)".dependencies.windows-sys]
version = "0.61"
features = [
    "Win32_Foundation",
    "Win32_NetworkManagement_IpHelper",
    "Win32_Networking_WinSock",
    "Win32_NetworkManagement_Ndis",
]