netscli-core 0.2.1

Core networking library: discovery, scanning, DNS, ARP, PCAP, and OUI resolution
Documentation
[package]
name = "netscli-core"
version = "0.2.1"
description = "Core networking library: discovery, scanning, DNS, ARP, PCAP, and OUI resolution"
authors.workspace = true
license.workspace = true
repository.workspace = true
edition.workspace = true
rust-version.workspace = true
# The OUI vendor DB ships with the crate so vendor lookups work
# out of the box on `cargo install`. ~400 KB gzipped.
include = [
    "src/**/*.rs",
    "tests/**/*.rs",
    "data/oui.min.json.gz",
    "Cargo.toml",
    "README.md",
]

[dependencies]
tokio.workspace = true
serde.workspace = true
serde_json.workspace = true
anyhow.workspace = true
thiserror.workspace = true
ipnet.workspace = true
pnet_packet = "0.35"
pnet_transport = "0.35"
ipnetwork = "0.20"
hickory-resolver = { version = "0.24", features = ["tokio-runtime"] }
sysinfo = "0.38"
mac_address = { version = "1.1", features = ["serde"] }
futures = "0.3"
once_cell = "1.21"
flate2 = "1.1"

# Optional — behind feature flags to keep the default crate slim for
# library consumers who only want the scan / DNS / ARP primitives.
chrono = { workspace = true, optional = true }
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio-rustls", "sqlite", "chrono", "macros", "migrate"], optional = true }
pcap = { version = "1.1", optional = true }
mdns-sd = { version = "0.13", optional = true }

[target.'cfg(unix)'.dependencies]
pnet_sys = "0.35"
pnet_datalink = "0.35"

[target.'cfg(windows)'.dependencies]
ipconfig = "0.3"
windows-sys = { version = "0.61", features = ["Win32_Networking_WinSock"] }

[features]
# Lean by default: scan, discover, DNS, ARP, OUI lookup, stats.
# Consumers who want the SQLite persistence or packet capture opt in.
default = []
# Enables the `db` module and `Database` type (SQLite via sqlx + chrono).
# Pulls sqlx and chrono; substantial build impact. Ship binaries built
# from the `netscli` crate already enable this.
db = ["dep:sqlx", "dep:chrono"]
# Enables PcapEngine. Requires libpcap at runtime on Linux/macOS and
# Npcap on Windows.
pcap = ["dep:pcap"]
# Enables MdnsEngine for discovering devices via DNS-SD/Bonjour/Avahi.
# Pure-Rust via mdns-sd — no system dependency.
mdns = ["dep:mdns-sd"]

[dev-dependencies]
tempfile = "3.27"