Crate allframe

Crate allframe 

Source
Expand description

§AllFrame

The Composable Rust API Framework

One frame to rule them all. Transform, compose, ignite.

AllFrame is the first Rust web framework designed, built, and evolved exclusively through Test-Driven Development (TDD).

§Quick Start

[dependencies]
allframe = "0.1"

§Features

  • Compile-time DI - Dependency injection resolved at compile time
  • Auto OpenAPI 3.1 - API documentation generated automatically
  • CQRS + Event Sourcing - Production-ready infrastructure (85% less boilerplate)
  • Protocol-Agnostic - Write once, expose via REST, GraphQL, and gRPC
  • Beautiful API Docs - Scalar UI, GraphiQL, gRPC Explorer built-in
  • Zero Runtime Deps - Only Tokio, Hyper, and std

§Example

use allframe::prelude::*;

#[allframe::main]
async fn main() {
    let app = App::new()
        .route("/hello", get(hello_handler));

    app.run().await;
}

#[api_handler]
async fn hello_handler() -> &'static str {
    "Hello, AllFrame!"
}

See the GitHub repository for more examples.

Modules§

arch
Clean Architecture enforcement Clean Architecture enforcement
async_trait
githubcrates-iodocs-rs
cache
Cache abstraction Cache abstraction for AllFrame applications
cqrs
CQRS + Event Sourcing CQRS + Event Sourcing implementation
health
Health check infrastructure Health check infrastructure for AllFrame applications
hyper
hyper
otel
OpenTelemetry automatic instrumentation OpenTelemetry automatic instrumentation
prelude
Prelude module for convenient imports
router
Router module for protocol-agnostic request handling Router module for protocol-agnostic request handling
serde
Serde
serde_json
Serde JSON
shutdown
Graceful shutdown utilities Graceful shutdown utilities
tokio
A runtime for writing reliable network applications without compromising speed.
tracing
A scoped, structured logging and diagnostics system.