use *;
async
async
async
No router configuration. No manual wiring. Annotate your handlers, call .discover(), ship.
Get started
Your API is running. That's it.
What you get
Auto-discovery — annotate handlers with #[get], #[post], #[put], #[delete]. Rapina finds them at startup. Your main.rs stays three lines.
Database from day one — define your schema declaratively. author: User becomes a foreign key. posts: Vec<Post> becomes a relationship. SeaORM entities are auto-generated.
schema!
Auth that works — JWT authentication, protected by default. Mark public routes with #[public]. Access the current user with the CurrentUser extractor.
async
async
CRUD in one command — scaffold an entire resource with handlers, DTOs, errors, schema, and migration.
OpenAPI built-in — spec generation, breaking change detection, and validation from the CLI.
Production middleware — rate limiting, compression, CORS out of the box. Prometheus metrics available with the metrics feature flag.
new
.with_rate_limit
.with_compression
.with_cors
.with_metrics // Requires `metrics` feature flag
.discover
.listen
.await
CLI for everything — create, develop, test, inspect, generate.
Built-in extractors
Everything you need to pick apart a request, type-safe and compile-time checked.
Json<T> · Path<T> · Query<T> · Headers · Cookie<T> · State<T> · CurrentUser · Db · ... and more
See the extractors documentation for the full list.
Standardized errors
Every error includes a trace_id. No more guessing in production.
Project status
Rapina is in active development with a rapid release cadence. The API is stabilizing but breaking changes may still occur before 1.0.0.
See the roadmap for what's coming next.
Documentation
Full documentation at userapina.com
Contributing
Contributions are welcome. Check out the open issues or join us on Discord.
License
MIT