barehttp 0.1.0

Blocking HTTP/1.1 client for no_std + alloc
Documentation
[package]
name = "barehttp"
version = "0.1.0"
edition = "2024"
rust-version = "1.90"
authors = ["greenstorm5417"]
license = "MIT OR Apache-2.0"
description = "Blocking HTTP/1.1 client for no_std + alloc"
repository = "https://github.com/Greenstorm5417/barehttp"
homepage = "https://github.com/Greenstorm5417/barehttp"
documentation = "https://docs.rs/barehttp"
readme = "README.md"
keywords = ["http", "client", "no_std", "blocking", "http1"]
categories = ["network-programming", "no-std", "web-programming::http-client"]
autobenches = false

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

[features]
default = []
cookie-jar = []

gzip = []
zstd = ["dep:ruzstd"]
# Gates Valgrind-backed Gungraun benches (Linux-only dev-dep below).
bench-gungraun = []

[dependencies]
bytes = { version = "1.12.1", default-features = false }
compact_str = { version = "0.10.0", default-features = false }
hashbrown = { version = "0.17.1", default-features = false, features = ["default-hasher", "equivalent"] }
phf = { version = "0.14.0", default-features = false, features = ["macros"] }
ruzstd = { version = "0.9.0", default-features = false, optional = true }

[dev-dependencies]
# Test-only; never a runtime dep of the library.
flate2 = { version = "1.1.9", default-features = false, features = ["rust_backend"] }
proptest = "1.6"
criterion = { version = "0.8.2", default-features = false, features = ["cargo_bench_support"] }
dhat = "0.3.3"
httparse = "1.10"
trybuild = { version = "1.0", features = ["diff"] }

# Valgrind client requests — unsupported on Windows/macOS; keep out of their test graphs.
[target.'cfg(target_os = "linux")'.dev-dependencies]
gungraun = { version = "0.19.4", features = ["client_requests"] }

[target.'cfg(unix)'.dependencies]
libc = { version = "0.2.189", default-features = false }

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61.2", default-features = false, features = [
  "Win32_Networking_WinSock",
  "Win32_Foundation",
  "Win32_System_SystemInformation",
  # Required for `WSASend` (vectored write); pulls `OVERLAPPED` only.
  "Win32_System_IO",
] }

# Lints that apply to *all* targets (lib, tests, benches, examples). Keep this
# narrow: pedantic/nursery/`missing_docs`/`unwrap_used` stay in `src/lib.rs` so
# CI `-D warnings` does not explode on benches and integration tests.
# Restriction denies for library code: see `#![deny(...)]` in `src/lib.rs`.
[lints.rust]
unsafe_op_in_unsafe_fn = "deny"
# Kani sets `cfg(kani)` when verifying; declare it so `-D warnings` CI is clean.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(kani)'] }
# Not `unreachable_pub = "warn"`: private modules keep `pub` for crate-internal
# clarity (see `clippy::redundant_pub_crate` allow in `src/lib.rs`). C-HIDDEN is
# enforced by `pub(crate)` module boundaries + root re-exports instead.

[lints.rustdoc]
broken_intra_doc_links = "deny"
private_intra_doc_links = "warn"
unescaped_backticks = "warn"
missing_crate_level_docs = "warn"

[lints.clippy]
# API shape (skill defaults; safe under `-D warnings` for every target).
# Heavier restriction/pedantic items stay in `src/lib.rs` so benches/tests
# are not forced through `-D warnings` on those groups.
ptr_arg = "deny"
missing_safety_doc = "deny"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
wrong_self_convention = "warn"
must_use_candidate = "warn"
return_self_not_must_use = "warn"
iter_not_returning_iterator = "warn"
should_implement_trait = "warn"
module_name_repetitions = "allow"

[profile.bench]
debug = 1

[[example]]
name = "basic"

[[example]]
name = "agent"

[[example]]
name = "custom_adapters"

[[example]]
name = "gzip"
required-features = ["gzip"]

[[example]]
name = "cookies"
required-features = ["cookie-jar"]

# Docker interop client; gated at runtime by BAREHTTP_INTEROP=1 (release/nightly).
[[test]]
name = "interop_client"
required-features = ["gzip"]

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

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

[[bench]]
name = "gungraun_callgrind"
harness = false
required-features = ["bench-gungraun"]

[[bench]]
name = "gungraun_cachegrind"
harness = false
required-features = ["bench-gungraun"]

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

[[bench]]
name = "dhat_gzip"
harness = false
required-features = ["gzip"]

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

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