proxy-protocol-codec 0.2.0

PROXY Protocol codec implementation in Rust. See HAProxy for the protocol specification.
Documentation
[package]
name = "proxy-protocol-codec"
version = "0.2.0"
edition = "2021"
rust-version = "1.77.0"

# === Publication info ===
authors = ["Hantong Chen <cxwdyx620@gmail.com>", "Miguel D. Salcedo <miguel@salcedo.cc>"]
categories = ["network-programming"]
description = "PROXY Protocol codec implementation in Rust. See HAProxy for the protocol specification."
keywords = ["proxy", "protocol", "haproxy", "codec"]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/hanyu-dev/proxy-protocol-codec"

[dependencies]
crc32c = { version = "0.6.8", default-features = false, optional = true }
slicur = { version = "0.2.0", optional = true }
thiserror = { version = "2.0", optional = true }
uni-addr = { version = "0.2.2", default-features = false, optional = true }
wrapper-lite = { version = "0.1.1", default-features = false }

[dev-dependencies]
criterion = { version = "0.7.0", features = ["html_reports"] }
ppp = "=2.3.0"

# [target.'cfg(unix)'.dev-dependencies]
# pprof = { version = "0.15.0", features = ["criterion", "flamegraph", "protobuf-codec"] }

[features]
default = [
    "feat-std",
    "feat-alloc",
    "feat-codec-encode",
    "feat-codec-decode",
    "feat-codec-v1",
    "feat-codec-v2",
    "feat-uni-addr",
]

# Enable std support.
feat-std = []

# Enable alloc support.
feat-alloc = []

# Enable nightly features.
feat-nightly = []

# Enable encoding support.
feat-codec-encode = ["feat-alloc", "dep:thiserror"]

# Enable decoding support.
feat-codec-decode = ["dep:thiserror", "dep:slicur"]

# Enable the v1 codec support.
feat-codec-v1 = []

# Enable the v2 codec support.
feat-codec-v2 = []

# Enable the v2 codec CRC32c support.
feat-codec-v2-crc32c = ["feat-std", "dep:crc32c"]

# Enable uni-addr support.
feat-uni-addr = ["feat-std", "dep:uni-addr"]

# Deprecated features.
feat-codec-v2-uni-addr = ["feat-uni-addr"]

[lints]
clippy.allow_attributes_without_reason = "warn"
clippy.assertions_on_result_states = "warn"
clippy.assigning_clones = "warn"
clippy.bool_to_int_with_if = "warn"
clippy.cognitive_complexity = "warn"
clippy.create_dir = "warn"
clippy.dbg_macro = "warn"
clippy.debug_assert_with_mut_call = "warn"
clippy.default_trait_access = "warn"
clippy.disallowed_script_idents = "deny"
clippy.doc_link_with_quotes = "warn"
clippy.doc_markdown = "warn"
clippy.else_if_without_else = "deny"
clippy.enum_glob_use = "warn"
clippy.filetype_is_file = "warn"
clippy.inefficient_to_string = "warn"
clippy.mem_forget = "warn"
clippy.missing_panics_doc = "warn"
clippy.mod_module_files = "deny"
clippy.multiple_inherent_impl = "warn"
clippy.mutex_atomic = "warn"
clippy.mutex_integer = "warn"
clippy.needless_continue = "warn"
clippy.panic = "warn"
clippy.significant_drop_in_scrutinee = "warn"
clippy.todo = "warn"
clippy.unimplemented = "warn"
clippy.unreachable = "warn"
clippy.wildcard_dependencies = "deny"
clippy.wildcard_imports = "warn"
rust.unsafe_code = "warn"
rust.missing_docs = "warn"
rust.missing_debug_implementations = "warn"
rust.unreachable_pub = "warn"

[[bench]]
name = "comparison"
harness = false