Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docs/PHILOSOPHY.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ validator = "0.16"
|-----------|----------------|--------------|
| HTTP Server | `hyper 1.x` | `hyper 2.x`, `h3` (HTTP/3) |
| Async Runtime | `tokio` | `smol`, `async-std` (future) |
| Validation | `validator` | Custom engine (planned for v1.0) |
| Validation | `rustapi-validate` | Custom engine (available) |
| Router | `matchit` | Custom radix tree |
| OpenAPI | `utoipa` | Native implementation |

Expand All @@ -105,6 +105,22 @@ validator = "0.16"
2. We bump `rustapi-rs` to `0.2.0`
3. **Your code stays exactly the same** — just update the version

### External Dependency Reduction (Harici Bağımlılıkları Azaltma)

RustAPI already hides external crates behind internal adapters. To reduce dependency debt, we target components with stable specs and small surface areas for replacement, while keeping the public API unchanged. The playbook is:

1. Wrap dependencies with internal traits/types so behavior is defined by RustAPI.
2. Add contract tests to lock in behavior before replacing internals.
3. Ship replacements behind feature flags, then flip defaults.

Good candidates for in-house implementations:
- Router (`matchit`) → internal radix tree with RustAPI-specific optimizations.
- OpenAPI (`utoipa`) → native schema generator to control outputs.
- TOON format (`toon-format`) → move core format logic into `rustapi-toon`.
- Template engine (`tera`) → minimal renderer for basic HTML views.

Not near-term targets: `tokio`, `hyper`, `tower` — large, security-sensitive, and foundational crates best kept upstream for now.

### 4. 🎁 Batteries Included (But Optional)

**Everything you need, nothing you don't.**
Expand Down
6 changes: 5 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ RustAPI is an ergonomic web framework for Rust, inspired by FastAPI's developer

> *"API surface is ours, engines can change."*

RustAPI provides a stable, ergonomic public API. Internal dependencies (`hyper`, `tokio`, `validator`) are implementation details that can be upgraded without breaking your code.
RustAPI provides a stable, ergonomic public API. Internal dependencies (e.g., `hyper`, `tokio`, `matchit`) are implementation details that can be upgraded without breaking your code.

### External Dependency Plan

To reduce external dependency debt, we prioritize replacing crates with stable specs and small surfaces, while keeping the public API unchanged. Validation already uses the native `rustapi-validate` engine; candidates for further RustAPI-owned implementations are routing, OpenAPI generation, the TOON format, and template rendering. Foundational runtime and HTTP crates (`tokio`, `hyper`, `tower`) remain external for stability and security.

## Getting Started

Expand Down