[package]
name = "boomnet"
version = "0.0.76"
edition = "2024"
license = "MIT"
description = "Framework for building low latency clients on top of TCP."
readme = "./README.md"
documentation = "https://docs.rs/boomnet"
repository = "https://github.com/HaveFunTrading/boomnet"
keywords = ["http", "ktls", "client", "websocket", "mio"]
categories = ["network-programming", "web-programming::websocket", "web-programming::http-client"]
rust-version = "1.87.0"

[package.metadata.docs.rs]
all-features = true

[features]
default = []
mio = ["dep:mio"]
rustls-native = ["rustls", "rustls-native-certs"]
rustls-webpki = ["rustls", "webpki-roots"]
openssl = ["dep:openssl", "dep:openssl-probe"]
ktls = ["openssl", "dep:openssl-sys", "dep:foreign-types", "dep:libc", "dep:openssl-src"]
http = ["dep:http", "httparse", "memchr", "itoa"]
ws = ["rand", "base64", "dep:http", "httparse"]
ext = []

[dependencies]
url = "2.5.0"
thiserror = "1.0.50"
socket2 = { version = "0.5.5", features = ["all"] }
pnet = "0.34.0"
mio = { version = "1", features = ["net", "os-poll"], optional = true }
rustls = { version = "0.22.4", optional = true }
rand = { version = "0.9.1", optional = true }
base64 = { version = "0.21.5", optional = true }
httparse = { version = "1.8.0", optional = true }
http = { version = "1.0.0", optional = true }
openssl = { version = "0.10.70", features = ["vendored"], optional = true }
openssl-probe = { version = "0.1.6", optional = true }
memchr = { version = "2.7.4", optional = true }
itoa = { version = "1.0.15", optional = true }
smallvec = "1.15.0"
smallstr = "0.3.1"
core_affinity = "0.8.3"
log = "0.4.20"
openssl-sys = { version = "0.9", optional = true }
foreign-types = { version = "0.3.1", optional = true }
libc = { version = "0.2", optional = true }

[dependencies.webpki-roots]
version = "0.26.0"
optional = true

[dependencies.rustls-native-certs]
version = "0.7.0"
optional = true

[dev-dependencies]
anyhow = "1"
env_logger = "0.10.1"
ansi_term = "0.12.1"
tungstenite = "0.28.0"
criterion = "0.5.1"
idle = "0.2.0"

[build-dependencies.openssl-src]
version = "300"
features = ["ktls"]
optional = true
default-features = false

[lints.clippy]
uninit_assumed_init = "allow"
mem_replace_with_uninit = "allow"

[profile.release]
debug = true
lto = true
codegen-units = 1

[[bench]]
name = "latency"
path = "benches/latency/main.rs"
harness = false
