tophat
An async HTTP server library. Currently in alpha.
The goal is to be low-level and small enough to work with different async runtimes and not dictate user architecture, while having enough convenience functions to still easily build a REST api.
Also, this:
async
instead of:
async
Features
- HTTP/1.1
- Works with any tcp stream that implements
futures::{AsyncRead, AsyncWrite}. - All dependencies are async-ecosystem independent.
- Not meant to be a framework; minimal abstraction.
- #[deny(unsafe_code)]
- Fast enough.
Correct handling of the HTTP protocol is a priority.
Upcoming features:
- Router. Service abstraction?
- Convenience functions for building Responses.
- Json feature.
- Client.
- Lots of examples.
- static file serving? (have to investigate something like
blocking).
Long term:
- HTTP/2
Thanks
Especially to async-h1, whose eye for structure and design I appreciate, and whose code base tophat is built from. And to hyper, whose devotion to performance and correctness is inspiring, and whose basic http libraries tophat has incorporated.
License
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.