Rapina 🦅
Predictable, auditable, and secure APIs — written by humans, accelerated by AI.
Rapina is a web framework for Rust inspired by FastAPI, focused on productivity, type safety, and clear conventions.
Why Rapina?
- Opinionated — Convention over configuration. 90% of apps require 10% of decisions.
- Type-safe — Typed extractors, typed errors, everything checked at compile time.
- AI-friendly — Predictable structure that humans and models understand.
- Production-ready — Standardized errors with
trace_id, ready for observability.
Quick Start
use *;
async
async
async
async
Features
Typed Extractors
async
async
Standardized Errors
Every error returns a consistent envelope with trace_id:
Declarative Macros
Roadmap
- Basic router
- Extractors (
Json,Path) - Proc macros (
#[get],#[post], etc.) - Standardized error handling
- Query extractor
- Dependency Injection / State
- Auth (Bearer JWT,
CurrentUser) - Observability (tracing, structured logs)
- Validation (
Validated<T>) - Automatic OpenAPI
- CLI (
rapina new,rapina routes)
Philosophy
Rapina is opinionated by design: a clear happy path, with escape hatches when needed.
| Principle | Description |
|---|---|
| Predictability | Clear conventions, obvious structure |
| Auditability | Typed contracts, traceable errors |
| Security | Guard rails by default |
License
MIT