volter-testing 0.1.0

In-process test client for integration-testing volter applications without binding a real socket.
Documentation

Volter

A production-grade, async-first web framework for Rust, built on hyper, tokio, and tower.

Volter follows the same architectural principles as tower — every component is a Service or a Layer, making the framework naturally composable with the broader tower ecosystem.

Features

  • Extractor-based handlersJson<T>, Query<T>, Path<T>, Extension<T>, State<T>, and custom extractors via FromRequest / FromRequestParts.
  • Tower-native middleware — any tower::Layer works directly with Router::layer(). Built-in layers include tracing, timeout, CORS, compression, rate-limiting, request ID, panic catching, and body limits.
  • Compile-time safety — state types and extractor parameters are checked at compile time. Wrong state type? It won't compile.
  • No panics in request paths — deny-level lints (unwrap_used, expect_used, panic, indexing_slicing) are enforced across every library crate.
  • Optional macros — the core API is pure Rust. Derive macros for custom extractors and attribute route macros (#[get], #[post]) are optional.
  • WebSocket support — behind the ws feature flag.
  • In-process testingTestClient dispatches requests directly through the router without binding a real socket.

Quick start

use tokio::net::TcpListener;
use volter::{get, serve, Router};

async fn hello() -> &'static str {
    "Hello, World!"
}

#[tokio::main]
async fn main() -> Result<(), volter::BoxError> {
    let app = Router::new().route("/", get(hello));
    let listener = TcpListener::bind("0.0.0.0:3000").await?;
    serve(listener, app).await
}

Documentation

Crate layout

Crate Description
volter Umbrella crate — re-exports everything
volter-core Core traits: Handler, FromRequest, IntoResponse, State
volter-router Router, MethodRouter, route construction
volter-extract Extractors: Json, Query, Path, Extension
volter-middleware Built-in middleware: TraceLayer, CorsLayer, etc.
volter-ws WebSocket support
volter-macros Derive and route attribute macros
volter-testing TestClient for integration tests
volter-cli CLI tool for project scaffolding

Performance

See the performance page for current Criterion benchmark results.

License

Licensed under either of:

at your option.