Documentation

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#

PageWhat it coversStatus
Clamp CLIclamp init (blank, app, web, TUI), clamp dev, self-update, Cargo commands, inspect, why, doctor, JSONReleased
Web appsRoutes, middleware, sessions, CSRF, views, rate limits, config, testing, deploymentReleased
ModulesIdentity, Requires, Provides; additive declarationsPrototype
CapabilitiesTyped ability contracts and how they resolvePrototype
ContributionsAssembling a subsystem from many modulesPrototype
ProcessesProjection, reachability, freeze, inspectionPrototype
LifecycleInitialize, start, ready, drain, stopPrototype
ArchitectureLayers, crates and the rules between them—
KernelWhat coordination Kernel does and does not doPrototype
RuntimeTask supervision; manual driver or optional TokioPrototype
IntegrationsHTTP, PostgreSQL, messaging, workers, schedulerPrototype
Loops and devicesDeterministic replay, fake device, CAN target, no_stdPrototype
Progressive controlUse, configure, extend, replace, ownPlanned

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.