Skip to main content

Crate allframe

Crate allframe 

Source
Expand description

§AllFrame

Complete Rust Web Framework with Built-in HTTP/2 Server

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

AllFrame is a complete Rust web framework with a built-in HTTP/2 server, designed and evolved exclusively through Test-Driven Development (TDD).

§Quick Start

[dependencies]
allframe = "0.1"

§What’s Included

  • Built-in HTTP/2 Server - Powered by Hyper, no external server needed
  • Multi-Protocol Support - REST, GraphQL, and gRPC from one codebase
  • 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)
  • Beautiful API Docs - Scalar UI, GraphiQL, gRPC Explorer built-in
  • Zero External Dependencies - 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§

application
Application layer orchestration and use case implementations. This module provides the orchestration layer that coordinates between domain logic and infrastructure, including resilience orchestration, transaction management, and business workflow coordination. Application layer orchestration and use case implementations.
arch
Clean Architecture enforcement with compile-time dependency injection.
async_trait
githubcrates-iodocs-rs
cache
Cache abstraction with in-memory and Redis backends.
cqrs
CQRS + Event Sourcing infrastructure with 85% boilerplate reduction.
di
Compile-time dependency injection infrastructure.
domain
Domain layer contracts and business logic primitives. This module provides the building blocks for Clean Architecture domain layers, including resilience contracts, business rules, and domain models. Domain layer contracts and business logic primitives.
health
Health check infrastructure for Kubernetes-ready services.
hyper
hyper
otel
OpenTelemetry automatic instrumentation for distributed tracing.
prelude
Prelude module for convenient imports
router
Protocol-agnostic request routing for REST, GraphQL, and gRPC.
serde
Serde
serde_json
Serde JSON
shutdown
Graceful shutdown utilities for production services.
tokio
A runtime for writing reliable network applications without compromising speed.
tracing
A scoped, structured logging and diagnostics system.

Derive Macros§

HealthCheck
Derive macro for automatic HealthCheck implementation
type Item = T;
","Iter<'_, T>":"

Notable traits for Iter<'a, T>

impl<'a, T> Iterator for Iter<'a, T>
type Item = &'a T;
","IterMut<'_, T>":"

Notable traits for IterMut<'a, T>

impl<'a, T> Iterator for IterMut<'a, T>
type Item = &'a mut T;
"}