Clamp documentation
Clamp is the application composition layer for Rust: it sits above the crates you already use, such as Axum, SQLx and Tokio, and composes them into coherent applications. These pages explain the model, show the runnable examples, and say plainly which parts exist today.
Status. Phases 0–9 are complete and released on main, including the clamp CLI and its one-line installer. Before 1.0, a license and registry ownership stand between the source and crates.io. These prototypes are not stable 1.0 APIs, package publication gates remain open, and no packages are published on crates.io. See the Roadmap.
Start here#
- Web apps — build a site or an API with
clamp init --web: routing, sessions, views and deployment. - Getting started — clone the repositories and run Hello Clamp in under a minute.
- Examples — runnable programs from Pico to processes that survive a crash mid-transaction.
- Concepts — the vocabulary in one page.
The model in one picture#
Your code + Rust crates + Clamp modules
│
▼
Requirements · Capabilities · Contributions
│
▼
Process projection → Freeze → Run
A module declares what it requires and what it provides. Kernel resolves those capabilities by type, assembles contributions into their targets, keeps only what a process can reach, and freezes the result before any work runs.
Read by topic#
| Page | What it covers | Status |
|---|---|---|
| Clamp CLI | clamp init (blank, app, web, TUI), clamp dev, self-update, Cargo commands, inspect, why, doctor, JSON | Released |
| Web apps | Routes, middleware, sessions, CSRF, views, rate limits, config, testing, deployment | Released |
| Modules | Identity, Requires, Provides; additive declarations | Prototype |
| Capabilities | Typed ability contracts and how they resolve | Prototype |
| Contributions | Assembling a subsystem from many modules | Prototype |
| Processes | Projection, reachability, freeze, inspection | Prototype |
| Lifecycle | Initialize, start, ready, drain, stop | Prototype |
| Architecture | Layers, crates and the rules between them | — |
| Kernel | What coordination Kernel does and does not do | Prototype |
| Runtime | Task supervision; manual driver or optional Tokio | Prototype |
| Integrations | HTTP, PostgreSQL, messaging, workers, scheduler | Prototype |
| Loops and devices | Deterministic replay, fake device, CAN target, no_std | Prototype |
| Progressive control | Use, configure, extend, replace, own | Planned |
Source#
RustClamp is one repository per package under github.com/rustclamp. All nine are public: rustclamp (facade, examples, ADRs, evidence), core, kernel, runtime, http, postgres, messaging, worker and scheduler. Design decisions are recorded as ADRs in rustclamp/docs/adr; measurements in rustclamp/docs/evidence.