[package]
name = "nex"
version.workspace = true
edition.workspace = true
authors.workspace = true
description = "Cross-platform networking library in Rust"
repository = "https://github.com/shellrow/nex"
readme = "../README.md"
keywords = ["network", "packet"]
categories = ["network-programming"]
license = "MIT"

[dependencies]
nex-core = { workspace = true }
nex-packet = { workspace = true }
nex-datalink = { workspace = true }
nex-socket = { workspace = true }

[dev-dependencies]
bytes = { workspace = true }
serde_json = "1.0"
rand = { workspace = true }
futures = "0.3"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "signal", "macros"] }

[features]
pcap = ["nex-datalink/pcap"]
serde = ["nex-core/serde", "nex-packet/serde", "nex-datalink/serde"]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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