lest
This crate provides a modular abstraction over actix-web
allowing advanced guarding, request/response verification and separate modules. The concepts are designed to be similar to NestJS and ElysiaJS in terms of modularity and request/response verification. It's designed to be easy, and uses my other library libcoerced
to provide advanced verification.
Example
Basic Usage
This provides a root route and serves a directory excluding the path routes/**
.
use ;
let root_route = new;
let mut app = new;
app.dir;
leaked
.serve.await;
Features
Lest is designed to have everything you need out of the box- no middlewares, no extra dependencies.
- Guarding: Enforce host, port, methods, headers, query parameters and more.
- Request/Response Verification: Verify request and response bodies.
- Modular: Separates different routes into different modules.
- Easy: Designed to be easy to use and understand.
- Rewrites: Rewrite request paths to different paths.
- Serving: Serve directories and files and exclude restricted paths.
- [soon] Caching: Cache responses and requests.
- [soon] Custom Errors: Custom error handling.
- [soon] Rate Limiting: Rate limit requests.