[package]
edition = "2024"
rust-version = "1.93"
name = "guess"
version = "0.2.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance zero-copy network protocol detection from first bytes."
readme = "README.md"
keywords = [
"protocol",
"sniff",
"network",
"detector",
"zero-copy",
]
categories = [
"network-programming",
"parser-implementations",
"no-std",
]
license = "MIT"
repository = "https://github.com/canmi21/guess.git"
[package.metadata.docs.rs]
all-features = true
[features]
db = [
"mysql",
"postgres",
"redis",
]
default = ["std"]
dhcp = []
dns = []
ftp = []
full = [
"tcp",
"udp",
"web",
"db",
"tracing",
"std",
"smtp",
"pop3",
"imap",
"ftp",
"smb",
"stun",
"sip",
"rtsp",
]
http = []
imap = []
mqtt = []
mysql = []
ntp = []
pop3 = []
postgres = []
quic = []
redis = []
rtsp = []
sip = []
smb = []
smtp = []
ssh = []
std = []
stun = []
tcp = [
"http",
"imap",
"tls",
"ssh",
"mysql",
"postgres",
"redis",
"mqtt",
"smtp",
"pop3",
"ftp",
"smb",
"sip",
"rtsp",
]
tls = []
tracing = ["dep:tracing"]
udp = [
"dns",
"dhcp",
"ntp",
"quic",
"stun",
"sip",
"rtsp",
]
web = [
"http",
"tls",
"quic",
]
[lib]
name = "guess"
path = "src/lib.rs"
[[example]]
name = "custom_chain"
path = "examples/custom_chain.rs"
[[example]]
name = "single_protocol"
path = "examples/single_protocol.rs"
[[example]]
name = "tcp_detect"
path = "examples/tcp_detect.rs"
[[example]]
name = "with_tracing"
path = "examples/with_tracing.rs"
[dependencies.thiserror]
version = "2"
[dependencies.tracing]
version = "0.1"
optional = true
default-features = false
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]
[lints.clippy]
await_holding_lock = "warn"
dbg_macro = "warn"
empty_enums = "warn"
enum_glob_use = "warn"
equatable_if_let = "warn"
exit = "warn"
filter_map_next = "warn"
fn_params_excessive_bools = "warn"
if_let_mutex = "warn"
implicit_clone = "warn"
imprecise_flops = "warn"
inefficient_to_string = "warn"
linkedlist = "warn"
lossy_float_literal = "warn"
macro_use_imports = "warn"
manual_let_else = "warn"
match_same_arms = "warn"
match_wildcard_for_single_variants = "warn"
mem_forget = "warn"
must_use_candidate = "warn"
needless_borrow = "warn"
needless_continue = "warn"
needless_pass_by_ref_mut = "warn"
needless_pass_by_value = "warn"
option_option = "warn"
redundant_clone = "warn"
ref_option = "warn"
rest_pat_in_fully_bound_structs = "warn"
return_self_not_must_use = "warn"
single_match_else = "warn"
str_to_string = "warn"
suboptimal_flops = "warn"
todo = "warn"
trivially_copy_pass_by_ref = "warn"
type_complexity = "allow"
uninlined_format_args = "warn"
unnested_or_patterns = "warn"
unused_self = "warn"
use_self = "warn"
verbose_file_reads = "warn"
[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
unreachable_pub = "warn"
unsafe_code = "forbid"
[lints.rust.rust_2018_idioms]
level = "warn"
priority = -1