hyper (Rust)
Low-level HTTP/1.1 and HTTP/2 implementation for Rust built on Tokio. Hyper is the foundation for most Rust HTTP tooling — reqwest uses hyper as its HTTP engine, and axum is built on hyper. Provides both server and client HTTP implementations with full protocol correctness and high performance. Use hyper directly when you need maximum control over HTTP handling; use axum or reqwest for ergonomic abstractions.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
No TLS built-in — requires explicit hyper-rustls or hyper-tls. Memory safety guaranteed by Rust. Protocol correctness is very high — hyper passes HTTP conformance tests. HTTP/2 HPACK implementation is audited.
⚡ Reliability
Best When
You're building infrastructure-level HTTP tooling (proxies, gateways, custom protocols) where you need full control over the HTTP layer.
Avoid When
You're building application services — axum, actix-web, or reqwest are far more ergonomic for typical use cases.
Use Cases
- • Build custom HTTP servers with fine-grained control over request handling, streaming, and connection management
- • Implement HTTP reverse proxies, load balancers, or middleware that need direct HTTP/1.1 and HTTP/2 access
- • Use as the HTTP engine underlying higher-level libraries like reqwest (client) or axum (server)
- • Handle HTTP streaming (chunked transfer, server-sent events) with full protocol control
- • Build HTTP clients with custom connection pooling, redirect policies, or protocol behavior
Not For
- • Application-level web services — use axum or actix-web which provide routing, extractors, and middleware
- • Simple HTTP requests — use reqwest which wraps hyper with ergonomic API and TLS by default
- • Non-Rust applications — hyper is Rust-only
Interface
Authentication
Library with no auth — auth at HTTP level is application responsibility.
Pricing
Free and open source, maintained by Sean McArthur and community.
Agent Metadata
Known Gotchas
- ⚠ hyper 1.x broke API compatibility with 0.14 significantly — many tutorials and examples use 0.14 API; check version before following examples
- ⚠ hyper requires an executor (Tokio) — it must be called from within a Tokio runtime; use #[tokio::main] or tokio::runtime::Runtime explicitly
- ⚠ Body types are generic and use http_body::Body trait — composing bodies requires understanding the trait, not just Vec<u8> or String
- ⚠ TLS is NOT included in hyper — use hyper-tls or hyper-rustls crates for HTTPS; hyper handles raw HTTP only
- ⚠ Connection upgrade (WebSockets, HTTP/2 upgrade) requires manual implementation using hyper's upgrade() mechanism — not automatic
- ⚠ Server-side hyper requires implementing a Service trait for request handling — the ergonomic abstractions (routing, extractors) are in axum, not hyper itself
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for hyper (Rust).
Scores are editorial opinions as of 2026-03-06.