h3-axum
Direct h3 → Axum. No middleman. Just an adapter.
With HTTP/3, the web is a transport, not just a verbs API.
The Problem
🧭 You have an Axum router. You want HTTP/3.
Write your own h3 ↔ Axum adapter.
Handle body conversions, protocol details, error cases.
The Solution 🛠️
// 1. Your Axum router (unchanged)
let app = new
.route;
// 2. Standard HTTP/3 setup (h3 + quinn)
let h3_conn = builder
.build
.await?;
// 3. Bridge h3 → Axum (one line)
serve_h3_with_axum.await?;
That's it. Direct h3 → Axum.
# What h3-axum Provides
Just the adapter:
// Bridge h3 ↔ Axum
serve_h3_with_axum.await?;
// Distinguish graceful closes from errors
if is_graceful_h3_close
That's the entire library.
Example ▶️
Complete working server in examples/server.rs:
- Axum Router with extractors (Path, Query, Json)
- Quinn + h3 setup with TLS
- Connection lifecycle and graceful shutdown
- Error handling
Run it:
# Test:
License 📝
MIT or Apache-2.0