Skip to content
/ RustAPI Public

RustAPI – A batteries-included Rust web framework with FastAPI-like ergonomics, OpenAPI docs, JWT, and MCP-ready TOON format for AI & LLM APIs.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

Tuntii/RustAPI

RustAPI

RustAPI

Rust Speed. Python Simplicity. AI Efficiency.

Crates.io Docs License


⚡ Why RustAPI?

Most Rust frameworks force you to choose: Speed (Actix) OR Ergonomics (Axum). RustAPI gives you both.

We built the framework we wanted: FastAPI's developer experience backed by Rust's raw performance. No boilerplate. No fighting the borrow checker for simple handlers. Just code that flies.

🧠 The Killer Feature: AI-First Architecture

Problem: Standard JSON APIs are verbose and expensive for Large Language Models (LLMs). Solution: RustAPI natively supports TOON (Token-Oriented Object Notation).

Top-tier LLMs (Claude, GPT-4) charge by the token. RustAPI's TOON format reduces response token counts by 50-58% compared to standard JSON.

  • 💰 Save 50% on API Costs: Half the tokens, same data.
  • 🌊 Zero-Latency Streaming: Built for real-time AI agents.
  • 🔌 MCP-Ready: Out-of-the-box support for Model Context Protocol.

"RustAPI isn't just a web server; it's the native language of your AI agents."

🥊 Dare to Compare

We optimize for Developer Joy without sacrificing Req/Sec.

Feature RustAPI Actix-web Axum FastAPI (Python)
Performance ~92k req/s ~105k ~100k ~12k
DX (Simplicity) 🟢 High 🔴 Low 🟡 Medium 🟢 High
Boilerplate Zero High Medium Zero
AI/LLM Native Yes ❌ No ❌ No ❌ No
Stability Logic 🛡️ Facade ⚠️ Direct ⚠️ Direct ✅ Stable

🚀 30-Second Start

Write your API in 5 lines. It's that simple.

use rustapi_rs::prelude::*;

#[derive(Serialize, Schema)]
struct Message { text: String }

#[rustapi::get("/hello/{name}")]
async fn hello(Path(name): Path<String>) -> Json<Message> {
    Json(Message { text: format!("Hello, {}!", name) })
}

#[rustapi::main]
async fn main() {
    // 1 line to rule them all: Auto-discovery, OpenAPI, Validation
    RustApi::auto().run("127.0.0.1:8080").await
}

That's it. You get:

  • Swagger UI at /docs
  • Input Validation
  • Multi-threaded Runtime
  • Zero Config

🗺️ Public Roadmap: Next 30 Days

We build in public. Here is our immediate focus for February 2026:

  • Visual Status Page: Automatic health dashboard for all endpoints.
  • gRPC Integration: First-class support via Tonic.
  • Distributed Tracing: One-line OpenTelemetry setup.
  • RustAPI Cloud: One-click deploy to major cloud providers.

📚 Documentation

We moved our detailed architecture, recipes, and deep-dives to the Cookbook.


Built with ❤️ by the Tunti3.

About

RustAPI – A batteries-included Rust web framework with FastAPI-like ergonomics, OpenAPI docs, JWT, and MCP-ready TOON format for AI & LLM APIs.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 3

  •  
  •  
  •