hyper-util

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

Library
Cargo
v0.1.21
182 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
82 /100 Excellent
Development Activity 88
Maintenance 80
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

TypeScript
88%
MIT

Mistle

AI Agents · Developer Tools

95

Self-hostable platform for running autonomous coding agents in isolated, credentialless sandboxes with brokered credentials, reusable snapshots, and event-driven triggers.

View details
50
Repo Health
76
Technical
70
Dependency
Built with
TypeScript 88%
Rust 11%
Updated 3 weeks ago
Rust
87%
Apache 2.0

OpenShell

AI Agents · Developer Tools

18,930

The safe, private runtime that lets autonomous AI agents operate in sandboxed environments governed by declarative YAML policies — blocking data exfiltration, credential leaks, and unauthorized network activity before they happen.

View details
84
Repo Health
81
Technical
67
Dependency
Built with
Rust 87%
Updated 5 days ago
Rust
63%
MIT

Readur

Bookmarks Archiving · File Storage · Knowledge Management

804

A self-hosted document management system that OCRs, indexes, and makes every PDF, scan, and Office file instantly searchable.

View details
83
Repo Health
78
Technical
67
Dependency
Built with
Rust 63%
TypeScript 32%
Updated 5 days ago
Rust
72%
Apache 2.0

Rivet

AI Agents · Developer Tools

6,326

Stateful actors as a primitive for AI agents, real-time collaboration, and durable execution — with in-memory state, WebSockets, queues, and scheduling built in.

View details
87
Repo Health
81
Technical
64
Dependency
Built with
Rust 72%
TypeScript 25%
Updated 5 days ago
Rust
98%

Stalwart

Collaboration

15,268

All-in-one secure mail and collaboration server covering IMAP, JMAP, SMTP, CalDAV, CardDAV, and WebDAV in a single memory-safe Rust binary.

View details
88
Repo Health
81
Technical
65
Dependency
Built with
Rust 98%
Updated 1 weeks ago
Rust
46%
MIT

Svix

Automation · Developer Tools

3,463

Open source, self-hostable webhook infrastructure that handles delivery, retries, HMAC signing, and multi-tenant event management so you never have to build a webhooks system from scratch.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
Rust 46%
C# 16%
Updated 6 days ago
Rust
66%
Apache 2.0

Temps

Analytics · Devops · Monitoring

865

A self-hosted Rust PaaS that replaces Vercel, Sentry, PostHog, Pingdom, Resend, and E2B with one binary — plus 440+ CLI operations agents like Claude Code can drive directly.

View details
81
Repo Health
86
Technical
66
Dependency
Built with
Rust 66%
TypeScript 33%
Updated 6 days ago
Rust
79%
Apache 2.0

TensorZero

Ab Testing Experimentation · AI Development · Monitoring

11,708

TensorZero unifies the LLM gateway, observability, evaluation, optimization, and experimentation stack behind a single OpenAI-compatible API, built in Rust for sub-millisecond p99 latency.

View details
53
Repo Health
87
Technical
68
Dependency
Built with
Rust 79%
TypeScript 15%
Updated 4 months ago
Rust
50%
Apache 2.0

Vibe Kanban

AI Agents · AI Code Assistants · Project Management

28,441

A kanban board for planning work and dispatching Claude Code, Codex, Gemini CLI, and eight other coding agents into isolated git worktrees, then reviewing and merging their diffs from one UI.

View details
72
Repo Health
75
Technical
63
Dependency
Built with
Rust 50%
TypeScript 46%
Updated 1 months 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