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.

# Install AllFrame CLI
cargo install allframe

# Create a new project
allframe ignite my-api

# Run your API
cd my-api && cargo run
crates.io version downloads docs.rs CI license MSRV

Composable Crates

Crate Description Version
allframe Re-exports core + CLI (allframe ignite) version
allframe-core Router, CQRS, DI, resilience, auth, security version
allframe-macros Proc macros: #[handler], #[di_container], #[retry], ... version
allframe-forge Project scaffolding and code generation version
allframe-mcp MCP server -- expose handlers as LLM tools version
allframe-tauri Tauri 2.x plugin for offline-first desktop apps version

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, ProjectionRegistry, event versioning, and saga orchestration. 85% average boilerplate reduction with pluggable backends.

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. Typed returns, TypeScript codegen, in-process handler 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, header redaction.

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 - - -
TDD from day zero 100% - - -

Ready to build?

AllFrame is open source under MIT and Apache 2.0 licenses.