#http-middleware #async #streaming #async-middleware

no-std http-kit

A flexible and ergonomic HTTP toolkit for Rust with async support, middleware, and zero-copy body handling

6 releases

0.4.2 Dec 9, 2025
0.4.1 Dec 9, 2025
0.3.0 Dec 5, 2025
0.1.2 Jul 16, 2025

#569 in Asynchronous

Download history 98/week @ 2025-12-01 460/week @ 2025-12-08 87/week @ 2025-12-15 116/week @ 2025-12-22 70/week @ 2025-12-29 40/week @ 2026-01-05 3/week @ 2026-01-12 56/week @ 2026-01-19 198/week @ 2026-01-26 85/week @ 2026-02-02

342 downloads per month
Used in 7 crates (4 directly)

MIT license

135KB
2K SLoC

http-kit

crates.io doc.rs License Coverage

A flexible and ergonomic HTTP toolkit for Rust that provides high-level abstractions for HTTP operations while maintaining performance and type safety.

Features

  • Type-safe HTTP primitives - Request, Response, Headers, and Body types with strong type checking
  • Streaming support - Efficient handling of large payloads through streaming interfaces
  • Body transformations - Convert between different body formats (JSON, form data, files) with zero-copy when possible
  • Middleware system - Extensible middleware architecture for request/response processing
  • Async/await ready - Built on top of futures-lite for async I/O operations

Optional Features

  • json - JSON serialization/deserialization via serde_json
  • form - Form data handling via serde_urlencoded
  • fs - File upload support with MIME type detection
  • mime - MIME type parsing and manipulation
  • http_body - Implementation of http_body traits

Example

use http_kit::{Request, Response, Result};

async fn handler(mut req: Request) -> Result<Response> {
    // Parse JSON request body
    let user = req.into_json().await?;

    // Create JSON response
    Response::empty()
        .status(200)
        .json(&user)
}

License

This project is licensed under the MIT license.

Dependencies

~2.2–3MB
~57K SLoC