Crucible
A contract-first API framework. Describe your API once in a .cru model,
implement it on a fast Rust server runtime, and generate native clients in 14
languages, OpenAPI, reference docs, a service CLI, and infrastructure packages
from the same contract.
This crate is one of the packages that make up Crucible. Its description says what it does; its API documentation is on docs.rs. This README is the one most Crucible crates share, so its links are absolute.
Which crates to depend on
A service or client author writes against the stable surface:
| Crate | Role |
|---|---|
crucible-server-runtime-rust |
The server framework: pipeline, protocols, validation, errors, middleware, HTTP and Lambda hosting |
crucible-client-runtime-rust |
The Rust client runtime: transport, retries, error decoding, pagination |
crucible-wire |
What server and client share: operation descriptions, modelled errors, wire codecs |
crucible-auth |
Server authenticators |
crucible-build |
Cargo build scripts: compile a model, generate server bindings, SDKs and other outputs |
crucible-api |
Optional single entry point re-exporting the runtimes above |
The crucible-codegen-*, crucible-ir, crucible-lang and other generator
crates are internals of crucible-build; depend on them directly only if you
accept that they change in any release.
Use one Crucible version for every Crucible crate in a build, and upgrade them together: generated code checks the runtime version at compile time.
Documentation
- Quick start: your first service, end to end
- Framework guide: architecture, request lifecycle, middleware, testing, hosting
- Build outputs: what
crucible-buildgenerates and how runtimes are pinned - Clients and the Rust client
- Language reference: the
.crugrammar and checks - Stability, migrating and the changelog
Status
Crucible is 0.x. Patch releases never break the documented stable surface; a
minor release may, but only with a migration entry. See the
stability policy.
License
Licensed under the Apache License, Version 2.0, with a clarification that code Crucible generates from your models belongs to you. The LICENSE file ships in every package.