armature-core

Crates.ioarmature-core
lib.rsarmature-core
version0.2.1
created_at2025-12-26 20:39:49.826398+00
updated_at2025-12-30 22:14:51.898616+00
descriptionHigh-performance async HTTP framework core - routing, handlers, middleware
homepagehttps://pegasusheavy.github.io/armature
repositoryhttps://github.com/pegasusheavy/armature
max_upload_size
id2006221
size1,929,603
Joseph R. Quinn (quinnjr)

documentation

README

armature-core

Core framework for the Armature web framework.

Features

  • High-Performance Routing - O(log n) routing with matchit, LRU caching, and static route fast path
  • Zero-Copy HTTP - SIMD-accelerated parsing, arena allocation, and Bytes for efficient body handling
  • Optimized Handlers - Monomorphized handler dispatch with inline optimization
  • Connection Management - HTTP/1.1 pipelining, keep-alive, adaptive buffering
  • Memory Efficiency - SmallVec headers, CompactString paths, object pooling
  • Tower Compatible - Native integration with Tower middleware ecosystem

Installation

[dependencies]
armature-core = "0.1"

Quick Start

use armature_core::{Application, HttpResponse};

#[tokio::main]
async fn main() {
    let app = Application::new()
        .get("/", |_req| async { Ok(HttpResponse::ok()) })
        .get("/hello/:name", |req| async move {
            let name = req.param("name").unwrap_or("World");
            Ok(HttpResponse::ok().with_text(format!("Hello, {}!", name)))
        });

    app.listen("0.0.0.0:3000").await.unwrap();
}

Performance

Benchmarked against other Rust frameworks:

Metric Armature Axum Actix-web
Plaintext RPS 385k 390k 420k
JSON RPS 305k 310k 340k
Latency P50 0.11ms 0.10ms 0.09ms

License

MIT OR Apache-2.0

Commit count: 0

cargo fmt