[workspace]
resolver = "2"
members = [
"crates/zenith-api",
"crates/zenith-foundation",
"crates/zenith-linux",
"crates/zenith-ebpf",
"crates/zenith-net",
"crates/zenith-tls",
"crates/zenith-http1",
"crates/zenith-http2",
"crates/zenith-http3",
"crates/zenith-web",
"crates/zenith-proxy",
"crates/zenith-cache",
"crates/zenith-waf",
"crates/zenith-forward",
"crates/zenith-runtime",
"crates/zenith-capability",
"crates/zenith-observability",
"crates/zenith-testkit",
"crates/zenith-fingerprint",
]
[package]
name = "zenith-stack"
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 全协议栈框架:AF_XDP + eBPF + TLS 1.3 + HTTP/1-2-3 + Web + Proxy + WAF,按需导入"
keywords = ["zenith", "framework", "network", "protocol", "af_xdp"]
categories = ["network-programming", "web-programming"]
readme = "README.md"
[lib]
name = "zenith_stack"
path = "src/lib.rs"
[[example]]
name = "hello_server"
required-features = ["web", "runtime"]
[[example]]
name = "full_feature_server"
required-features = ["web", "runtime", "proxy"]
[[example]]
name = "l4_test"
required-features = ["net", "forward"]
[[example]]
name = "l4_relay_test"
required-features = ["net", "forward"]
[[example]]
name = "auto_degrade_test"
required-features = ["core", "capability", "runtime"]
[[example]]
name = "fingerprint_block_test"
required-features = ["web", "tls", "runtime"]
[[example]]
name = "fingerprint_ext_test"
required-features = ["web", "tls", "runtime"]
[[example]]
name = "fingerprint_live_server"
required-features = ["web", "tls", "runtime"]
[[example]]
name = "fingerprint_h3_block_test"
required-features = ["web", "tls", "runtime"]
[dev-dependencies]
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
rustls = { version = "0.23", default-features = false, features = ["std", "logging", "tls12", "ring"] }
tokio = { workspace = true, features = ["time"] }
[dependencies]
zenith-api = { workspace = true, optional = true }
zenith-foundation = { workspace = true, optional = true }
zenith-linux = { workspace = true, optional = true }
zenith-ebpf = { workspace = true, optional = true }
zenith-net = { workspace = true, optional = true }
zenith-tls = { workspace = true, optional = true }
zenith-http1 = { workspace = true, optional = true }
zenith-http2 = { workspace = true, optional = true }
zenith-http3 = { workspace = true, optional = true }
zenith-web = { workspace = true, optional = true }
zenith-proxy = { workspace = true, optional = true }
zenith-cache = { workspace = true, optional = true }
zenith-waf = { workspace = true, optional = true }
zenith-forward = { workspace = true, optional = true }
zenith-runtime = { workspace = true, optional = true }
zenith-capability = { workspace = true, optional = true }
zenith-observability = { workspace = true, optional = true }
zenith-testkit = { workspace = true, optional = true }
zenith-fingerprint = { workspace = true, optional = true }
[target.'cfg(target_os = "linux")'.dependencies]
audit = { version = "0.7.3", optional = true }
[lints]
workspace = true
[features]
default = ["api", "core"]
api = ["dep:zenith-api"]
core = ["dep:zenith-foundation"]
linux = ["dep:zenith-linux", "zenith-net?/linux"]
ebpf = ["dep:zenith-ebpf"]
net = ["dep:zenith-net", "core"]
tls = ["dep:zenith-tls", "core"]
http1 = ["dep:zenith-http1", "net"]
http2 = ["dep:zenith-http2", "net"]
http3 = ["dep:zenith-http3", "net"]
web = ["dep:zenith-web", "core"]
proxy = ["dep:zenith-proxy", "core"]
cache = ["dep:zenith-cache", "core"]
waf = ["dep:zenith-waf", "core"]
forward = ["dep:zenith-forward", "core", "zenith-forward?/linux"]
runtime = ["dep:zenith-runtime", "net", "linux", "ebpf", "zenith-web?/full"]
capability = ["dep:zenith-capability", "core"]
observability = ["dep:zenith-observability", "core"]
audit = ["dep:audit"]
testkit = ["dep:zenith-testkit", "full"]
fingerprint = ["dep:zenith-fingerprint"]
http = ["http1", "http2", "http3"]
full-stack = [
"api", "web", "http", "tls", "proxy", "cache", "waf", "forward",
"runtime", "capability", "observability",
]
full = ["full-stack", "testkit"]
[workspace.package]
version = "0.1.0"
edition = "2024"
rust-version = "1.97.1"
license = "MIT OR Apache-2.0"
repository = "https://gitcode.com/Mosi45-git/Zenith"
homepage = "https://www.mosit.cn"
documentation = "https://docs.rs/zenith-stack"
authors = ["Zenith Developers <2098175794@qq.com>"]
[workspace.lints.rust]
unsafe_code = "deny"
missing_debug_implementations = "warn"
missing_docs = "warn"
[workspace.lints.clippy]
all = "warn"
correctness = "deny"
suspicious = "deny"
perf = "deny"
[workspace.dependencies]
zenith-api = { path = "crates/zenith-api", version = "0.1.0" }
zenith-foundation = { path = "crates/zenith-foundation", version = "0.1.0" }
zenith-linux = { path = "crates/zenith-linux", version = "0.1.0" }
zenith-ebpf = { path = "crates/zenith-ebpf", version = "0.1.0" }
zenith-net = { path = "crates/zenith-net", default-features = false, version = "0.1.0" }
zenith-tls = { path = "crates/zenith-tls", version = "0.1.0" }
zenith-http1 = { path = "crates/zenith-http1", version = "0.1.0" }
zenith-http2 = { path = "crates/zenith-http2", version = "0.1.0" }
zenith-http3 = { path = "crates/zenith-http3", version = "0.1.0" }
zenith-web = { path = "crates/zenith-web", default-features = false, version = "0.1.0" }
zenith-proxy = { path = "crates/zenith-proxy", version = "0.1.0" }
zenith-cache = { path = "crates/zenith-cache", version = "0.1.0" }
zenith-waf = { path = "crates/zenith-waf", version = "0.1.0" }
zenith-forward = { path = "crates/zenith-forward", default-features = false, version = "0.1.0" }
zenith-runtime = { path = "crates/zenith-runtime", version = "0.1.0" }
zenith-capability = { path = "crates/zenith-capability", version = "0.1.0" }
zenith-observability = { path = "crates/zenith-observability", version = "0.1.0" }
zenith-testkit = { path = "crates/zenith-testkit", version = "0.1.0" }
zenith-fingerprint = { path = "crates/zenith-fingerprint", version = "0.1.0" }
thiserror = "1"
libbpf-rs = "0.24"
libbpf-sys = "1.4"
libc = "0.2"
tokio = { version = "1", features = ["full"] }
io-uring = "0.7"
crossbeam = "0.8"
bytes = "1"
rustls = { version = "0.23", default-features = false, features = ["std", "logging", "tls12", "ring"] }
quinn-proto = ">=0.11.15"
rustc-hash = "1.1"
smallvec = "1.13"
ring = "0.17"
zeroize = "1"
md-5 = "0.10"
sha2 = "0.10"
serde = { version = "1", features = ["derive"] }
toml = "0.8"
rand = "0.8"
tracing = "0.1"
pretty_assertions = "1"
proptest = "1"
tokio-test = "0.1"
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = "symbols"
incremental = false
[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "symbols"
incremental = false
[profile.release-debug]
inherits = "release"
strip = "none"
debug = true