# 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 = "nlink"
version = "0.1.2"
authors = ["Marc Pardo <p13marc@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Async netlink library for Linux network configuration"
documentation = "https://docs.rs/nlink"
readme = "README.md"
keywords = [
    "netlink",
    "linux",
    "networking",
    "async",
    "iproute2",
]
categories = [
    "network-programming",
    "os::linux-apis",
    "asynchronous",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/p13marc/nlink"
resolver = "2"

[package.metadata.docs.rs]
all-features = true
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
default = []
full = [
    "sockdiag",
    "tuntap",
    "tuntap-async",
    "tc",
    "output",
    "namespace_watcher",
]
integration = []
namespace_watcher = ["dep:inotify"]
output = ["dep:serde"]
sockdiag = ["dep:serde"]
tc = []
tuntap = []
tuntap-async = ["tuntap"]

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

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

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

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

[dependencies.bytes]
version = "1"

[dependencies.inotify]
version = "0.11"
features = ["stream"]
optional = true
default-features = false

[dependencies.libc]
version = "0.2"

[dependencies.netlink-sys]
version = "0.8"

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

[dependencies.serde_json]
version = "1"

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1"
features = [
    "full",
    "net",
    "io-util",
    "sync",
]

[dependencies.tracing]
version = "0.1"

[dependencies.winnow]
version = "0.7"

[dev-dependencies.tokio]
version = "1"
features = [
    "full",
    "net",
    "io-util",
    "sync",
    "macros",
    "rt-multi-thread",
]
