Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

aioduct is an async-native Rust HTTP client built directly on hyper 1.x — with no hyper-util dependency and no legacy APIs.

Motivation

The Rust HTTP client ecosystem has a gap:

  • reqwest depends on hyper-util’s legacy::Client, which wraps hyper 0.x-style patterns over hyper 1.x. It carries years of backwards-compatibility baggage.
  • hyper-util itself labels its client as “legacy” — the hyper team acknowledges it’s not the right long-term answer.
  • hyper 1.x was redesigned to be a minimal HTTP protocol engine with clean connection-level primitives (hyper::client::conn::http1, hyper::client::conn::http2), but no production client uses it this way today.

aioduct fills this gap: a production-quality HTTP client that uses hyper 1.x the way it was intended — as a protocol engine you drive yourself, with your own connection pool, TLS, and runtime integration.

Design Principles

  1. No hyper-util — custom executor and IO adapters directly against hyper::rt traits. ~50 lines each, zero legacy baggage.
  2. No default runtime — the core crate is pure types, traits, and logic. Opt into a runtime via feature flags.
  3. No default TLS — plain HTTP works out of the box. Enable rustls for HTTPS.
  4. Runtime-agnostic coreHttpEngineSend<R, C> and HttpEngineLocal<R, C> are generic over runtime and connector traits. All pool, TLS, and HTTP logic works with any conforming runtime.
  5. HTTP/3 as experimental — h3 + h3-quinn behind a feature flag.

Comparison with reqwest

Featurereqwestaioduct
hyper version1.x via hyper-util legacy1.x direct
hyper-utilRequiredNot used
Runtimetokio onlytokio / smol / compio / wasm
TLSrustls or native-tlsrustls (native-tls reserved)
HTTP/3ExperimentalExperimental
io_uringNoVia compio feature
Connection poolhyper-util legacyCustom, built for h1/h2/h3
Cookie jarYesYes
SSE streamingNo (manual)Built-in
Rate limitingNoBuilt-in
HTTP cachingNoBuilt-in
MiddlewareVia towerBuilt-in + tower
Happy EyeballsNoRFC 6555
Digest authNoBuilt-in
Bandwidth limiterNoBuilt-in
NetrcNoBuilt-in
Request timingsNoBuilt-in