Bolt-web
⚡ A high-performance, minimalist web framework for Rust, inspired by Express.js and Gin.
Bolt is a lightweight, modular, and fully asynchronous web framework built on top of hyper and tokio.
It focuses on performance, simplicity, and full control — ideal for REST APIs, WebSocket services, and microservice backends.
🚀 Features
- 🌐 Supports HTTP/1.x and HTTP/2 - built in support for both http/1.x and http/2.
- 🔥 Built in Router - Fast and flexible routing system with path parameters, dynamic segments, and middleware chaining per route.
- ⚙️ Grouping Routes — Simple builder-style API for responses.
- 🧩 Middleware System — Add CORS, Helmet, Logging, Rate Limiting, Error handling easily.
- 🔄 Fully Supports Async — Built on top of
tokio. - ⚙️ Request & Response Abstraction — Simple builder-style API for responses.
- 🌍 Minimal HTTP Client — Builtin client for inter-service communication (OAuth, APIs, etc).
Dependencies
bolt-web = "0.2"
serde =
serde_json = "1.0.145"
🦀 Example Usage
use json;
use ;
async
async
bolt_handler!;
⚡ HTTP Client Example
Use the built-in Client to make external API calls.
use Client;
let client = new;
let joke: Joke = client.get.await.unwrap;
🔧 Middleware
Comes with helpful middleware by default.
Logger Prints method and route for every request.
Helmet Sets secure HTTP headers.
Cors Enables cross-origin requests.
RateLimiter Simple in-memory request limiter.
ErrorHandler Handles and serializes errors.
🧠 License
MIT © 2025 — Built with ❤️ in Rust.