zenith-stack 0.1.0

Zenith 全协议栈框架:AF_XDP + eBPF + TLS 1.3 + HTTP/1-2-3 + Web + Proxy + WAF,按需导入
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.97.1"
name = "zenith-stack"
version = "0.1.0"
authors = ["Zenith Developers <2098175794@qq.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Zenith 全协议栈框架:AF_XDP + eBPF + TLS 1.3 + HTTP/1-2-3 + Web + Proxy + WAF,按需导入"
homepage = "https://www.mosit.cn"
documentation = "https://docs.rs/zenith-stack"
readme = "README.md"
keywords = [
    "zenith",
    "framework",
    "network",
    "protocol",
    "af_xdp",
]
categories = [
    "network-programming",
    "web-programming",
]
license = "MIT OR Apache-2.0"
repository = "https://gitcode.com/Mosi45-git/Zenith"
resolver = "2"

[features]
api = ["dep:zenith-api"]
audit = ["dep:audit"]
cache = [
    "dep:zenith-cache",
    "core",
]
capability = [
    "dep:zenith-capability",
    "core",
]
core = ["dep:zenith-foundation"]
default = [
    "api",
    "core",
]
ebpf = ["dep:zenith-ebpf"]
fingerprint = ["dep:zenith-fingerprint"]
forward = [
    "dep:zenith-forward",
    "core",
    "zenith-forward?/linux",
]
full = [
    "full-stack",
    "testkit",
]
full-stack = [
    "api",
    "web",
    "http",
    "tls",
    "proxy",
    "cache",
    "waf",
    "forward",
    "runtime",
    "capability",
    "observability",
]
http = [
    "http1",
    "http2",
    "http3",
]
http1 = [
    "dep:zenith-http1",
    "net",
]
http2 = [
    "dep:zenith-http2",
    "net",
]
http3 = [
    "dep:zenith-http3",
    "net",
]
linux = [
    "dep:zenith-linux",
    "zenith-net?/linux",
]
net = [
    "dep:zenith-net",
    "core",
]
observability = [
    "dep:zenith-observability",
    "core",
]
proxy = [
    "dep:zenith-proxy",
    "core",
]
runtime = [
    "dep:zenith-runtime",
    "net",
    "linux",
    "ebpf",
    "zenith-web?/full",
]
testkit = [
    "dep:zenith-testkit",
    "full",
]
tls = [
    "dep:zenith-tls",
    "core",
]
waf = [
    "dep:zenith-waf",
    "core",
]
web = [
    "dep:zenith-web",
    "core",
]

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

[[example]]
name = "auto_degrade_test"
path = "examples/auto_degrade_test.rs"
required-features = [
    "core",
    "capability",
    "runtime",
]

[[example]]
name = "fingerprint_block_test"
path = "examples/fingerprint_block_test.rs"
required-features = [
    "web",
    "tls",
    "runtime",
]

[[example]]
name = "fingerprint_ext_test"
path = "examples/fingerprint_ext_test.rs"
required-features = [
    "web",
    "tls",
    "runtime",
]

[[example]]
name = "fingerprint_h3_block_test"
path = "examples/fingerprint_h3_block_test.rs"
required-features = [
    "web",
    "tls",
    "runtime",
]

[[example]]
name = "fingerprint_live_server"
path = "examples/fingerprint_live_server.rs"
required-features = [
    "web",
    "tls",
    "runtime",
]

[[example]]
name = "full_feature_server"
path = "examples/full_feature_server.rs"
required-features = [
    "web",
    "runtime",
    "proxy",
]

[[example]]
name = "hello_server"
path = "examples/hello_server.rs"
required-features = [
    "web",
    "runtime",
]

[[example]]
name = "l4_relay_test"
path = "examples/l4_relay_test.rs"
required-features = [
    "net",
    "forward",
]

[[example]]
name = "l4_test"
path = "examples/l4_test.rs"
required-features = [
    "net",
    "forward",
]

[dependencies.zenith-api]
version = "0.1.0"
optional = true

[dependencies.zenith-cache]
version = "0.1.0"
optional = true

[dependencies.zenith-capability]
version = "0.1.0"
optional = true

[dependencies.zenith-ebpf]
version = "0.1.0"
optional = true

[dependencies.zenith-fingerprint]
version = "0.1.0"
optional = true

[dependencies.zenith-forward]
version = "0.1.0"
optional = true
default-features = false

[dependencies.zenith-foundation]
version = "0.1.0"
optional = true

[dependencies.zenith-http1]
version = "0.1.0"
optional = true

[dependencies.zenith-http2]
version = "0.1.0"
optional = true

[dependencies.zenith-http3]
version = "0.1.0"
optional = true

[dependencies.zenith-linux]
version = "0.1.0"
optional = true

[dependencies.zenith-net]
version = "0.1.0"
optional = true
default-features = false

[dependencies.zenith-observability]
version = "0.1.0"
optional = true

[dependencies.zenith-proxy]
version = "0.1.0"
optional = true

[dependencies.zenith-runtime]
version = "0.1.0"
optional = true

[dependencies.zenith-testkit]
version = "0.1.0"
optional = true

[dependencies.zenith-tls]
version = "0.1.0"
optional = true

[dependencies.zenith-waf]
version = "0.1.0"
optional = true

[dependencies.zenith-web]
version = "0.1.0"
optional = true
default-features = false

[dev-dependencies.rustls]
version = "0.23"
features = [
    "std",
    "logging",
    "tls12",
    "ring",
]
default-features = false

[dev-dependencies.tokio]
version = "1"
features = [
    "full",
    "time",
]

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
    "fmt",
    "env-filter",
]

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

[lints.clippy]
all = "warn"
correctness = "deny"
perf = "deny"
suspicious = "deny"

[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
unsafe_code = "deny"

[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1
incremental = false
strip = "symbols"

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
incremental = false
strip = "symbols"

[profile.release-debug]
debug = 2
inherits = "release"
strip = "none"