| Crates.io | h3-axum |
| lib.rs | h3-axum |
| version | 0.2.0 |
| created_at | 2025-10-29 00:56:02.014341+00 |
| updated_at | 2025-11-28 16:13:46.804213+00 |
| description | Transport your Axum router over HTTP/3. Use your existing handlers with QUIC. |
| homepage | |
| repository | https://github.com/iadev09/h3-axum |
| max_upload_size | |
| id | 1905861 |
| size | 65,944 |
Direct h3 → Axum. No middleman. Just an adapter.
With HTTP/3, the web is a transport, not just a verbs API.
🧭 You have an Axum router. You want HTTP/3.
Write your own h3 ↔ Axum adapter.
Handle body conversions, protocol details, error cases.
// 1. Your Axum router (unchanged)
let app = Router::new()
.route("/users", get(list_users));
// 2. Standard HTTP/3 setup (h3 + quinn)
let h3_conn = h3::server::builder()
.build(h3_quinn::Connection::new(conn))
.await?;
// 3. Bridge h3 → Axum (one line)
h3_axum::serve_h3_with_axum(app, resolver).await?;
That's it. Direct h3 → Axum.
Just the adapter:
// Bridge h3 ↔ Axum
h3_axum::serve_h3_with_axum(app, resolver).await?;
// Distinguish graceful closes from errors
if h3_axum::is_graceful_h3_close( & err) { /* ... */ }
That's the entire library.
Complete working server in examples/server.rs:
Run it:
cargo run --example server
# Test:
curl --http3-only -k https://localhost:4433/
curl --http3-only -k https://localhost:4433/users/123
MIT or Apache-2.0