Skip to content

Commit 2df8a62

Browse files
committed
Add comprehensive documentation and update examples
Added detailed documentation files: ARCHITECTURE.md, FEATURES.md, GETTING_STARTED.md, and PHILOSOPHY.md under the docs directory, as well as a new image asset. Updated README.md to include philosophy and documentation links. Modified hello-world example to align with new documentation and API surface. These changes provide a complete overview, feature reference, and onboarding guide for RustAPI.
1 parent d7b8529 commit 2df8a62

8 files changed

Lines changed: 2424 additions & 115 deletions

File tree

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,46 @@ RustAPI redefines **API development for the AI era**.
1818

1919
We combine Rust's performance and safety with FastAPI's ergonomics. Write type-safe, production-ready APIs without fighting trait bounds. **MCP servers**, **LLM integrations**, or classic REST APIs — one framework for all.
2020

21+
---
22+
23+
## Philosophy
24+
25+
> *"API surface is ours, engines can change."*
26+
27+
RustAPI follows a **Facade Architecture** — a stable, ergonomic public API that shields you from internal complexity and breaking changes.
28+
29+
### Core Principles
30+
31+
| Principle | What It Means |
32+
|-----------|---------------|
33+
| **🎯 5-Line APIs** | A working REST endpoint in 5 lines. No ceremony. |
34+
| **🛡️ Stable Surface** | Your code depends on `rustapi-rs`. Internal crates (`hyper`, `tokio`, `validator`) are implementation details. |
35+
| **🔄 Engines Change** | We can swap `hyper` for `h3`, upgrade `tokio`, or replace `validator` — your code stays the same. |
36+
| **🎁 Batteries Included** | JWT, CORS, Rate Limiting, OpenAPI — all built-in, all optional via feature flags. |
37+
| **🤖 LLM-First** | TOON format, token counting headers, MCP-ready. Built for the AI era. |
38+
39+
### Why This Matters
40+
41+
```
42+
┌─────────────────────────────────────────────────────────────┐
43+
│ Your Application │
44+
│ use rustapi_rs::prelude::* │
45+
├─────────────────────────────────────────────────────────────┤
46+
│ rustapi-rs (Facade) │
47+
│ Stable API ── Never Breaks │
48+
├───────────────┬───────────────┬───────────────┬─────────────┤
49+
│ rustapi-core │ rustapi-toon │ rustapi-extras│ ... │
50+
│ (hyper) │ (serde) │ (jwt) │ │
51+
├───────────────┴───────────────┴───────────────┴─────────────┤
52+
│ Foundation: tokio, serde, hyper │
53+
│ ↑ Can be upgraded/swapped internally │
54+
└─────────────────────────────────────────────────────────────┘
55+
```
56+
57+
**Internal upgrades don't break your code.** When `hyper 2.0` releases, we update `rustapi-core`. Your `RustApi::new()` keeps working.
58+
59+
📚 Read more: [docs/PHILOSOPHY.md](docs/PHILOSOPHY.md) | [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)
60+
2161
```rust
2262
use rustapi_rs::prelude::*;
2363

assets/image.png

61.7 KB
Loading

0 commit comments

Comments
 (0)