|
| 1 | +[package] |
| 2 | +name = "proxy-protocol-codec" |
| 3 | +version = "0.1.0" |
| 4 | +edition = "2021" |
| 5 | +rust-version = "1.77.0" |
| 6 | + |
| 7 | +# === Publication info === |
| 8 | +authors = ["Hantong Chen <cxwdyx620@gmail.com>", "Miguel D. Salcedo <miguel@salcedo.cc>"] |
| 9 | +categories = ["network-programming"] |
| 10 | +description = "PROXY Protocol codec implementation in Rust. See HAProxy for the protocol specification." |
| 11 | +keywords = ["proxy", "protocol", "haproxy", "codec", "decode", "encode"] |
| 12 | +license = "Apache-2.0" |
| 13 | +readme = "README.md" |
| 14 | +repository = "https://github.com/hanyu-dev/proxy-protocol-codec" |
| 15 | + |
| 16 | +[dependencies] |
| 17 | +crc32c = { version = "0.6", default-features = false, optional = true } |
| 18 | +slicur = { version = "0.2", optional = true } |
| 19 | +thiserror = { version = "2.0", optional = true } |
| 20 | +uni-addr = { version = "0.2", default-features = false, optional = true } |
| 21 | +wrapper-lite = { version = "0.1", default-features = false } |
| 22 | + |
| 23 | +[dev-dependencies] |
| 24 | +criterion = { version = "0.7.0", features = ["html_reports"] } |
| 25 | +ppp = "=2.3.0" |
| 26 | + |
| 27 | +# [target.'cfg(unix)'.dev-dependencies] |
| 28 | +# pprof = { version = "0.15.0", features = ["criterion", "flamegraph", "protobuf-codec"] } |
| 29 | + |
| 30 | +[features] |
| 31 | +default = [ |
| 32 | + "feat-std", |
| 33 | + "feat-codec-encode", |
| 34 | + "feat-codec-decode", |
| 35 | + "feat-codec-v1", |
| 36 | + "feat-codec-v2", |
| 37 | + "feat-codec-v2-crc32c", |
| 38 | + "feat-codec-v2-uni-addr", |
| 39 | +] |
| 40 | + |
| 41 | +# Enable std support. |
| 42 | +feat-std = [] |
| 43 | + |
| 44 | +# Enable nightly features. |
| 45 | +feat-nightly = [] |
| 46 | + |
| 47 | +# Enable encoding support. |
| 48 | +feat-codec-encode = ["dep:thiserror"] |
| 49 | + |
| 50 | +# Enable decoding support. |
| 51 | +feat-codec-decode = ["dep:thiserror", "dep:slicur"] |
| 52 | + |
| 53 | +# Enable the v1 codec support. |
| 54 | +feat-codec-v1 = [] |
| 55 | + |
| 56 | +# Enable the v2 codec support. |
| 57 | +feat-codec-v2 = [] |
| 58 | + |
| 59 | +# Enable the v2 codec CRC32c support. |
| 60 | +feat-codec-v2-crc32c = ["feat-std", "dep:crc32c"] |
| 61 | + |
| 62 | +# Enable uni-addr support. |
| 63 | +feat-codec-v2-uni-addr = ["feat-std", "dep:uni-addr"] |
| 64 | + |
| 65 | +[lints] |
| 66 | +clippy.allow_attributes_without_reason = "warn" |
| 67 | +clippy.assertions_on_result_states = "warn" |
| 68 | +clippy.assigning_clones = "warn" |
| 69 | +clippy.bool_to_int_with_if = "warn" |
| 70 | +clippy.cognitive_complexity = "warn" |
| 71 | +clippy.create_dir = "warn" |
| 72 | +clippy.dbg_macro = "warn" |
| 73 | +clippy.debug_assert_with_mut_call = "warn" |
| 74 | +clippy.default_trait_access = "warn" |
| 75 | +clippy.disallowed_script_idents = "deny" |
| 76 | +clippy.doc_link_with_quotes = "warn" |
| 77 | +clippy.doc_markdown = "warn" |
| 78 | +clippy.else_if_without_else = "deny" |
| 79 | +clippy.enum_glob_use = "warn" |
| 80 | +clippy.filetype_is_file = "warn" |
| 81 | +clippy.inefficient_to_string = "warn" |
| 82 | +clippy.mem_forget = "warn" |
| 83 | +clippy.missing_panics_doc = "warn" |
| 84 | +clippy.mod_module_files = "deny" |
| 85 | +clippy.multiple_inherent_impl = "warn" |
| 86 | +clippy.mutex_atomic = "warn" |
| 87 | +clippy.mutex_integer = "warn" |
| 88 | +clippy.needless_continue = "warn" |
| 89 | +clippy.panic = "warn" |
| 90 | +clippy.significant_drop_in_scrutinee = "warn" |
| 91 | +clippy.todo = "warn" |
| 92 | +clippy.unimplemented = "warn" |
| 93 | +clippy.unreachable = "warn" |
| 94 | +clippy.wildcard_dependencies = "deny" |
| 95 | +clippy.wildcard_imports = "warn" |
| 96 | +rust.unsafe_code = "warn" |
| 97 | +rust.missing_docs = "warn" |
| 98 | +rust.missing_debug_implementations = "warn" |
| 99 | +rust.unreachable_pub = "warn" |
| 100 | + |
| 101 | +[[bench]] |
| 102 | +name = "comparison" |
| 103 | +harness = false |
0 commit comments