hyper-util

Batteries-included utilities for hyper: connection pooling, Tokio I/O adapters, and client/server helpers

Library
Cargo
v0.1.21
181 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
80 /100 Excellent
Development Activity 84
Maintenance 76
Community 84
Maturity 56
Momentum 20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
79 /100 Good
Architecture 86
Code Quality 84
Innovation 76
Learning Curve 68

hyper-util fills in the gaps that hyper deliberately leaves out. hyper 1.0 is a minimal, low-level HTTP library by design, pushing concerns like connection pooling, automatic HTTP/1-or-2 protocol detection, graceful shutdown, and runtime I/O glue into separate crates — hyper-util is the official one, maintained by the same hyperium team.

It provides a legacy-style high-level client with connection pooling and proxy support, an auto server builder that negotiates HTTP/1.1 or HTTP/2 per connection, Tokio-based I/O and executor adapters that implement hyper’s Io and Executor traits, and Tower Service glue. It is a near-mandatory dependency for any production service built directly on hyper rather than a full framework like axum or actix-web.

What You Get

  • A legacy high-level HTTP client (client::legacy::Client) with connection pooling, keep-alive, and HTTP/SOCKS proxy support
  • An auto server builder that transparently negotiates HTTP/1.1 or HTTP/2 per incoming connection
  • Tokio-based adapters (TokioIo, TokioExecutor, TokioTimer) implementing hyper’s Io, Executor, and Timer traits
  • Graceful shutdown helpers (server::graceful::GracefulShutdown) for draining in-flight connections
  • Tower Service glue (service::TowerToHyperService) to bridge Tower middleware into hyper’s connection handling

Common Use Cases

  • Building a production HTTP client on top of hyper that needs connection pooling instead of dialing a new connection per request
  • Writing a server that must serve both HTTP/1.1 and HTTP/2 clients on the same listener without manual protocol sniffing
  • Wiring hyper’s low-level connection I/O to the Tokio runtime via TokioIo/TokioExecutor when hand-rolling a server or client
  • Integrating Tower middleware (retries, timeouts, load balancing) into a hyper-based service using the service glue module

Under The Hood

Architecture hyper-util is organized around the same seams hyper itself exposes: client/legacy (pooled client with connect/ submodules for DNS, TCP, and proxy tunneling), server/conn/auto (protocol-detecting server builder plus graceful shutdown), rt (the Tokio adapters bridging hyper’s abstract Io/Executor/Timer traits to real Tokio types), and service (Tower interop); each module is feature-gated independently (client, client-legacy, client-pool, server-auto, tokio, etc.) so consumers only compile the pieces they use, keeping the dependency-light philosophy of the hyper ecosystem intact while still offering a batteries-included experience via the full feature.

Tech Stack Rust edition 2024 (MSRV 1.85), built directly on hyper 1.9, http/http-body 1.0, bytes, and tokio (optional, feature-gated), with tower-service/tower-layer for Tower interop, socket2 for low-level socket options in the legacy client’s connection pool, and platform-specific dependencies (system-configuration on macOS, windows-registry on Windows) for reading OS-level proxy settings.

Code Quality The crate has a large, well-organized module tree mirroring its feature flags, extensive doc comments with runnable examples gated behind required-features in [[example]] blocks (client.rs, server.rs, server_graceful.rs), and a dev-dependency set (tokio-test, tower-test, pretty_env_logger) indicating a real integration-test suite exercising pooling, graceful shutdown, and protocol negotiation; as an official hyperium crate it inherits hyper’s CI discipline around MSRV and feature-matrix testing.

API Design The API leans on Rust’s trait system to stay decoupled from any specific async runtime in principle, though in practice almost every feature assumes Tokio (rt::tokio module, tokio feature flag), which keeps the ergonomics high for the common case at the cost of being less runtime-agnostic than the name suggests; feature flags are granular enough to avoid pulling in unused code, but new users need to know which combination (client-legacy + http1 + tokio, for instance) to enable, which is documented but adds a learning step beyond a single full = true.

Used by 19 apps in this directory

Swift
62%
GPL 3.0

cmux

AI Development · Developer Tools

27,452

A native, Ghostty-based macOS terminal with vertical tabs, agent-aware notifications, and a scriptable browser built for running many parallel AI coding agent sessions instead of juggling tmux panes.

View details
84
Repo Health
81
Technical
69
Dependency
Built with
Swift 62%
Rust 13%
Updated 4 days ago
Go
32%
Apache 2.0

CubeSandbox

AI Agents · Developer Tools · Security

12,728

Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.

View details
82
Repo Health
88
Technical
63
Dependency
Built with
Go 32%
Rust 26%
C 22%
Updated 1 weeks ago
Rust
67%
Other

DefGuard

Authentication · Networking · Security

2,849

Self-hosted secure remote access that unifies WireGuard VPN, identity management, and connection-level MFA in one open-source platform.

View details
84
Repo Health
82
Technical
72
Dependency
Built with
Rust 67%
TypeScript 31%
Updated 1 weeks ago
Python
82%
Apache 2.0

headroom

AI Development · Developer Tools

73,966

Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.

View details
85
Repo Health
86
Technical
69
Dependency
Built with
Python 82%
Rust 12%
Updated 5 days ago
Go
64%
MIT

hoop

Monitoring · Security

823

A wire-protocol gateway that enforces data masking, command blocking, approval workflows, and full session recording for engineers and AI agents accessing production infrastructure.

View details
85
Repo Health
80
Technical
64
Dependency
Built with
Go 64%
Clojure 17%
JavaScript 11%
Updated 1 weeks ago
Rust
73%
Other

iii

Developer Tools · Devops

18,814

Compose, extend, and observe every backend service in real time using three primitives: Workers, Functions, and Triggers.

View details
87
Repo Health
85
Technical
65
Dependency
Built with
Rust 73%
TypeScript 16%
Updated 5 days ago
Rust
52%
Other

Jan

AI Assistants

44,680

Run LLMs 100% locally with full privacy, or connect to cloud AI — your machine, your data, your control.

View details
90
Repo Health
81
Technical
65
Dependency
Built with
Rust 52%
TypeScript 44%
Updated 4 days ago
Dart
80%
Apache 2.0

LocalSend

Networking

92,857

An open-source, cross-platform AirDrop alternative that sends files and messages device-to-device over your local network with no internet, no account, and no cloud server involved.

View details
89
Repo Health
61
Technical
78
Dependency
Built with
Dart 80%
Rust 17%
Updated 5 days ago
Rust
100%
Other

Meilisearch

Search

59,424

Lightning-fast hybrid search engine with AI-powered semantic and full-text retrieval for modern applications.

View details
89
Repo Health
88
Technical
68
Dependency
Built with
Rust 100%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers