[package]
name = "nex-datalink"
version.workspace = true
edition.workspace = true
authors.workspace = true
description = "Provides cross-platform datalink layer networking. Part of nex project."
repository = "https://github.com/shellrow/nex"
readme = "../README.md"
keywords = ["network"]
categories = ["network-programming"]
license = "MIT"

[dependencies]
libc = { workspace = true }
bytes = { workspace = true }
serde = { workspace = true, features = ["derive"], optional = true }
pcap = { version = "2.0", optional = true }
nex-core = { workspace = true }
nex-sys = { workspace = true }
futures-core = "0.3"

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.61"
features = [
  "Win32_Foundation",
  "Win32_Networking_WinSock",
  "Win32_System_IO",
  "Win32_System_Threading",
  "Win32_System_WindowsProgramming",
]

[features]
serde = ["dep:serde", "nex-core/serde"]
pcap = ["dep:pcap"]

[dev-dependencies]
futures = "0.3"
