A minimal async HTTP server with a tiny_http
-like feel, built on Hyper 1.x.
async_tiny
is designed for simplicity: it gives you a clean, buffered request loop without exposing Hyper internals or requiring complex async plumbing. Ideal for small web apps, embedded tools, or frameworks like Velto.
✨ Features
- Async HTTP/1.1 server powered by Hyper
- Fully buffered request bodies (
Bytes
) - Simple
Request
andResponse
types - Clean loop:
while let Some(req) = server.next().await
- Respond via
req.respond(Response)
- No Hyper types exposed across threads
- Optional silent mode for clean logging
🚀 Quick Start
use ;
async
⚠️ Note: If you want to use
#[tokio::main]
in your own code, you must add Tokio to your project manually:
Although this crate depends on Tokio internally, Rust requires that procedural macros like
#[tokio::main]
be declared directly in your own Cargo.toml to work properly.
📦 Request API
📤 Response API
.with_content_type
.with_header
from_string
from_data
from_status_and_string
empty
🔧 Silent Mode
Suppress internal logging (e.g. connection errors, startup messages):
let server = http.await?;
🛠 Used By
- Velto — a minimal async web framework with LiveReload and templating.
📚 License
MIT
💬 Feedback
Open an issue or reach out via GitHub Discussions if you have ideas, bugs, or suggestions.