ugi 0.2.1

Runtime-agnostic Rust request client with HTTP/1.1, HTTP/2, HTTP/3, H2C, WebSocket, SSE, and gRPC support
Documentation
[package]
name = "ugi"
version = "0.2.1"
edition = "2024"
description = "Runtime-agnostic Rust request client with HTTP/1.1, HTTP/2, HTTP/3, H2C, WebSocket, SSE, and gRPC support"
license = "MIT OR Apache-2.0"
readme = "README.md"
documentation = "https://docs.rs/ugi"
keywords = ["http", "client", "request", "grpc", "websocket"]
categories = ["network-programming", "web-programming::http-client", "api-bindings"]

[features]
# Full-featured default: rustls TLS, HTTP/2, brotli and zstd compression.
# Disable individual features with `default-features = false` and re-enable only what you need.
default = ["rustls", "h2", "brotli", "zstd"]

# TLS back-ends (exactly one should be active)
rustls = ["dep:async-tls", "dep:rustls", "dep:webpki-roots"]
native-tls = ["dep:async-native-tls"]
btls-backend = ["dep:btls"]
boring-backend = ["btls-backend"]

# Browser/network emulation
emulation = ["btls-backend", "h2", "brotli"]

# Protocol layers
h2 = ["dep:hpack"]
# HTTP/3 via QUIC — requires compiling quiche and vendored BoringSSL (~60 s build time)
h3 = ["dep:quiche", "quiche/boringssl-vendored"]

# Compression codecs (gzip/deflate always included via flate2)
brotli = ["dep:brotli"]
zstd = ["dep:zstd"]

[dependencies]
async-trait = "0.1"
async-io = "2"
async-net = "2"
async-stream = "0.3"
async-tls = { version = "0.13", optional = true }
async-native-tls = { version = "0.6", optional = true }
btls = { version = "0.5.4", optional = true }
brotli = { version = "8", optional = true }
bytes = "1"
flate2 = "1"
futures-lite = "2"
async-channel = "2"
hpack = { version = "0.3", optional = true }
httpdate = "1"
quiche = { version = "0.26.1", optional = true, default-features = false }
rustls = { version = "0.21", optional = true, features = ["dangerous_configuration"] }
rustls-pemfile = "1"
rustls-native-certs = "0.8"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha1 = "0.10"
sha2 = "0.10"
socket2 = "0.5"
zstd = { version = "0.13", optional = true }
webpki-roots = { version = "0.22", optional = true }
md5 = "0.8.0"
async-fs = "2.2.0"
async-lock = "3.4.2"

[dev-dependencies]
graphql_client = "0.14"
rcgen = "0.14"
h2 = "0.4"
futures-util = "0.3"
http = "1"
httpmock = "0.7"
reqwest = { version = "0.12", default-features = false, features = ["http2", "rustls-tls"] }
reqwest-h3 = { version = "0.13", default-features = false }
smol = "2"
tempfile = "3"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
tokio-rustls = "0.26"
tokio-tungstenite = { version = "0.24", features = ["rustls-tls-webpki-roots"] }
smol-potat = "1.1.2"

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

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

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

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

[[bench]]
name = "h3_compare"
harness = false
required-features = []