AllFrame
The Composable Rust API Framework
Write your handler once, expose it via REST, GraphQL, and gRPC. Built-in HTTP/2 server, compile-time DI, CQRS, and MCP -- all TDD from day zero.
Composable Crates
| Crate | Description | Version |
|---|---|---|
| allframe | Re-exports core + CLI (allframe ignite) |
|
| allframe-core | Router, CQRS, DI, resilience, auth, security | |
| allframe-macros | Proc macros: #[handler], #[di_container], #[retry], ... |
|
| allframe-forge | Project scaffolding and code generation | |
| allframe-mcp | MCP server -- expose handlers as LLM tools | |
| allframe-tauri | Tauri 2.x plugin for offline-first desktop apps |
Features
Protocol-Agnostic Routing
Write once, expose via REST, GraphQL, and gRPC. Automatic schema generation for OpenAPI 3.1, GraphQL SDL, and .proto files.
CQRS + Event Sourcing
CommandBus, QueryBus, ProjectionRegistry, event versioning, and saga orchestration. #[command], #[query], #[event] generate real trait impls. 85% boilerplate reduction.
Compile-Time DI
Dependency injection resolved entirely at compile time. Zero runtime overhead, zero reflection.
Streaming Handlers
StreamSender with bounded backpressure and cooperative cancellation. Tauri IPC bridge, TypeScript codegen, and RxJS adapter.
MCP Server
Expose handlers as LLM-callable tools via Model Context Protocol. Separate crate for 100% zero overhead when not used.
Resilience Patterns
Retry with exponential backoff, circuit breakers (keyed per-resource), rate limiting (Redis-backed for distributed). Attribute macros included.
Layered Authentication
Protocol-agnostic auth: JWT validation (HS256, RS256, EdDSA), Axum extractors, gRPC interceptors, type-safe claims.
API Documentation
Auto-generated interactive docs: Scalar UI for REST (10x smaller than Swagger), GraphiQL 3.0 for GraphQL, gRPC Explorer.
Offline-First
SQLite event store, offline circuit breaker, store-and-forward, bidirectional sync. Zero network deps enforced by CI.
Tauri Desktop
#[tauri_compat] for mechanical migration. Async boot lifecycle with progress events. Typed returns, TypeScript codegen, in-process dispatch.
Contract Testing
Automatic test generation from router, schema validation, breaking change detection, and coverage reporting.
Security Utilities
URL/credential obfuscation, Sensitive<T> wrapper, #[derive(Obfuscate)] with #[sensitive] fields on structs and enums, header redaction.
Architecture Enforcement
Compile-time Clean Architecture layer checks. #[domain], #[repository], #[use_case], #[handler] macros reject invalid cross-layer dependencies.
Graceful Shutdown
Named task spawning with automatic cancellation, cleanup orchestration with error handling, cancellable futures.
CLI Scaffolding
allframe ignite my-api creates Clean Architecture projects with zero warnings. Handlers, commands, and queries generators.
100%
TDD Coverage
500+
Tests Passing
85%
Less Boilerplate
<2MB
Binary Size
6
Composable Crates
Framework Comparison
| AllFrame | Actix | Axum | Rocket | |
|---|---|---|---|---|
| Protocol-agnostic handlers | Yes | - | - | - |
| Built-in CQRS + Event Sourcing | Yes | - | - | - |
| Compile-time DI | Yes | - | - | - |
| Auto OpenAPI 3.1 | Yes | Manual | Manual | Manual |
| Resilience patterns | Built-in | External | External | - |
| MCP server (LLM tools) | Zero bloat | - | - | - |
| Streaming handlers | Yes | - | - | - |
| Offline-first / Tauri | Yes | - | - | - |
| Contract testing | Yes | - | - | - |
| Architecture enforcement | Compile-time | - | - | - |
| TDD from day zero | 100% | - | - | - |
Ready to build?
AllFrame is open source under MIT and Apache 2.0 licenses.