[package]
edition = "2024"
rust-version = "1.88"
name = "pktkit"
version = "0.1.3"
authors = ["Karpeles Lab Inc."]
build = false
exclude = [
"fuzz",
".github",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Zero-copy L2/L3 packet handling toolkit. Frames, packets, hubs, adapters, NAT, virtual TCP/IP, WireGuard, OpenVPN, QEMU networking, TUN/TAP, AF_XDP — all gated behind opt-in cargo features."
homepage = "https://github.com/KarpelesLab/pktkit-rs"
documentation = "https://docs.rs/pktkit"
readme = "README.md"
keywords = [
"networking",
"packet",
"tcp",
"wireguard",
"tun",
]
categories = [
"network-programming",
"virtualization",
]
license = "MIT"
repository = "https://github.com/KarpelesLab/pktkit-rs"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
afpacket = ["dep:libc"]
afxdp = ["xdp"]
default = []
dhcp = []
full = [
"l2adapter",
"dhcp",
"impair",
"pcap",
"qemu",
"tuntap",
"afpacket",
"xdp",
"afxdp",
"vtcp",
"slirp",
"vclient",
"nat",
"wg",
"ovpn",
]
fuzzing = []
impair = []
l2adapter = []
nat = ["vtcp"]
ovpn = [
"dep:purecrypto",
"purecrypto/hash",
"purecrypto/cipher",
"purecrypto/kdf",
"purecrypto/rng",
"purecrypto/tls",
"purecrypto/x509",
]
pcap = []
qemu = []
slirp = ["vtcp"]
tuntap = ["dep:libc"]
vclient = ["vtcp"]
vtcp = []
wg = [
"dep:purecrypto",
"purecrypto/hash",
"purecrypto/cipher",
"purecrypto/ec",
"purecrypto/rng",
]
xdp = ["dep:libc"]
[lib]
name = "pktkit"
path = "src/lib.rs"
[[test]]
name = "afpacket_loopback"
path = "tests/afpacket_loopback.rs"
[[test]]
name = "dhcp_over_hub"
path = "tests/dhcp_over_hub.rs"
[[test]]
name = "robustness"
path = "tests/robustness.rs"
[[test]]
name = "slirp_accept"
path = "tests/slirp_accept.rs"
[[test]]
name = "slirp_accept6"
path = "tests/slirp_accept6.rs"
[[test]]
name = "vclient_tcp"
path = "tests/vclient_tcp.rs"
[[test]]
name = "wg_cookie"
path = "tests/wg_cookie.rs"
[[test]]
name = "xdp_kernel"
path = "tests/xdp_kernel.rs"
[[bench]]
name = "hot_path"
path = "benches/hot_path.rs"
harness = false
[dependencies.libc]
version = "0.2"
optional = true
[dependencies.purecrypto]
version = "0.7"
features = [
"std",
"linux-getrandom",
]
optional = true
default-features = false
[dev-dependencies]