A lightweight, efficient, and modular HTTP server implementation built on top of tokio.
- Full HTTP/1.1 protocol support, HTTP 2 currently not supported
- Asynchronous I/O using tokio
- Streaming request and response bodies
- Chunked transfer encoding
- Keep-alive connections
- Expect-continue mechanism
- Efficient memory usage through zero-copy parsing
- Structured logging with tracing
This workspace contains the following crates:
-
micro-http: Core HTTP protocol implementation
- Zero-copy parsing
- Streaming bodies
- Full protocol compliance
- Example server
-
micro-web: High-level web framework
- Routing
- Middleware support
- Request/Response abstractions
- Getting started guide
Add this to your Cargo.toml
:
[dependencies]
micro-web = "0.1"
tokio = { version = "1", features = ["full"] }
See the getting started example for a complete working example.
For performance benchmarks and comparisons, see (we are not in this benchmark yes, but we will):
The Minimum Supported Rust Version is 1.74
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributions are welcome! Please feel free to submit a Pull Request.