ferranet 0.2.0

A modern, async-first, zero-copy datalink-layer (L2) networking library
Documentation
# 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"
rust-version = "1.85"
name = "ferranet"
version = "0.2.0"
authors = ["John Scarrott"]
build = false
exclude = [
    "/fuzz",
    "/.tangled",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A modern, async-first, zero-copy datalink-layer (L2) networking library"
documentation = "https://docs.rs/ferranet"
readme = "README.md"
keywords = [
    "networking",
    "datalink",
    "ethernet",
    "af-packet",
    "pcap",
]
categories = [
    "network-programming",
    "os::linux-apis",
]
license = "MIT OR Apache-2.0"
repository = "https://tangled.org/did:plc:62ng6ngn7kkqocxaimyzsve7/ferranet"

[package.metadata.docs.rs]
all-features = true
targets = ["x86_64-unknown-linux-gnu"]

[features]
default = ["tokio"]
pcap-bench = ["dep:pcap"]
tokio = ["dep:tokio"]
xdp = []

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

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

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

[[example]]
name = "sniff"
path = "examples/sniff.rs"
required-features = ["tokio"]

[[example]]
name = "xdp_sniff"
path = "examples/xdp_sniff.rs"
required-features = ["xdp"]

[[test]]
name = "dummy"
path = "tests/dummy.rs"

[[test]]
name = "hw"
path = "tests/hw.rs"

[[test]]
name = "property"
path = "tests/property.rs"

[[test]]
name = "veth"
path = "tests/veth.rs"

[[test]]
name = "xdp_veth"
path = "tests/xdp_veth.rs"

[[bench]]
name = "parse"
path = "benches/parse.rs"
harness = false

[[bench]]
name = "throughput"
path = "benches/throughput.rs"
harness = false

[dependencies.thiserror]
version = "2"

[dev-dependencies.criterion]
version = "0.8"
features = ["html_reports"]

[dev-dependencies.etherparse]
version = "0.19"

[dev-dependencies.libc]
version = "0.2"

[dev-dependencies.pnet_datalink]
version = "0.35"

[dev-dependencies.proptest]
version = "1"

[dev-dependencies.tokio]
version = "1"
features = [
    "net",
    "rt",
    "rt-multi-thread",
    "macros",
    "time",
]
default-features = false

[target.'cfg(target_os = "linux")'.dependencies.libc]
version = "0.2"

[target.'cfg(target_os = "linux")'.dependencies.pcap]
version = "2"
optional = true

[target.'cfg(target_os = "linux")'.dependencies.tokio]
version = "1"
features = [
    "net",
    "rt",
]
optional = true
default-features = false

[target.'cfg(target_os = "linux")'.dev-dependencies.aya]
version = "0.13.1"

[lints.clippy]
undocumented_unsafe_blocks = "warn"

[lints.rust]
missing_docs = "warn"
unsafe_op_in_unsafe_fn = "forbid"