zenith-linux 0.1.0

Zenith Linux 平台抽象层:AF_XDP Socket、UMEM 内存管理、四环操作(Fill/RX/TX/Completion)、描述符安全校验引擎
Documentation
[package]
name = "zenith-linux"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
documentation.workspace = true
authors.workspace = true
description = "Zenith Linux 平台抽象层:AF_XDP Socket、UMEM 内存管理、四环操作(Fill/RX/TX/Completion)、描述符安全校验引擎"
keywords = ["zenith", "linux", "af_xdp", "xsk", "umem"]
categories = ["os::linux-apis", "network-programming"]
readme = "../../README.md"

[dependencies]
zenith-foundation.workspace = true
thiserror.workspace = true
tracing.workspace = true

# AF_XDP/io_uring 仅 Linux 可用;非 Linux 目标下 crate 内容整体 cfg 门控为空
# 注:本 crate 走裸 syscall(socket/mmap/bind),不经 libbpf;libbpf 仅 zenith-ebpf 使用
[target.'cfg(target_os = "linux")'.dependencies]
libc.workspace = true
# O2: io_uring 异步 splice/sendfile 批量化(Linux 5.1+,可选)
io-uring = { workspace = true, optional = true }

[lints]
# 继承 workspace lint 铁律(unsafe_code = "deny"、clippy correctness/suspicious/perf = "deny")。
# 本 crate 内部需要少量 unsafe 来封装 AF_XDP 系统调用与 mmap,
# 只在具体模块文件(xsk.rs / umem.rs / ring.rs / lib.rs 的 uname 探测)
# 顶部以 `#[allow(unsafe_code)]` 精确放开,绝不 crate 级全开。
workspace = true

[features]
default = []
# 启用 io_uring 异步 IO 批量化(需 Linux 5.15+ 用于 splice SQE)
io_uring = ["dep:io-uring"]

[dev-dependencies]
pretty_assertions.workspace = true