Start with the quickstart
Stand up the smallest useful CrateStack service and see the generated runtime in a minimal Rust setup.
Build typed services from one schema — server-side Postgres, embedded SQLite (mobile, desktop, browser-via-OPFS), or HTTP client — with generated delegates, routes, policy checks, and clients.
Stand up the smallest useful CrateStack service and see the generated runtime in a minimal Rust setup.
See what the framework implements today, where it is already strong, and which parts are still intentionally deferred.
Keep authentication host-owned while still using generated policy enforcement inside the service runtime.
Learn how CrateStack thinks about codecs, route generation, client boundaries across REST/RPC/gRPC, and remaining transport seams.
Use the same .cstack schema against a local SQLite database — sync on mobile/desktop, persistent OPFS in the browser via wasm32-unknown-unknown.
CrateStack is a schema-first Rust framework that turns one .cstack file into typed runtimes for three deployment shapes: a Postgres-backed server, an embedded SQLite ORM that works on mobile, desktop, and browsers via OPFS, and a HTTP client. One schema in, three role-specific macros out — each emits only what its target needs, no transitive sqlx in mobile builds, no rusqlite in server builds.
INFO
Define your service once in .cstack, then pick a macro: include_server_schema! for sqlx-backed Postgres servers, include_embedded_schema! for offline-capable apps (native sync, browser async via OPFS), or include_client_schema! for the generated Rust client. Each emits a cratestack_schema module shaped for that one role — Dart, TypeScript, and gRPC clients are generated separately via CLI subcommands.
CrateStack is built for teams that want framework leverage without giving up Rust ownership. You define the data model and policy surface once, and the framework handles the repetitive service plumbing around it.
.cstack schema that defines models, procedures, auth shape, mixins, and policy rules..cstack file.include_server_schema!("…", db = Postgres) for the server, include_embedded_schema! for embedded ORM, or include_client_schema! for HTTP-only clients. Each validates the schema at compile time and emits a cratestack_schema module shaped for that role.sqlx::PgPool and bind your application auth through the host-owned provider boundary. Embedded: open a RusqliteRuntime (native) or install OPFS first inside a Worker (browser). Client: construct a CratestackClient against the server's URL.include_server_schema! / include_embedded_schema! / include_client_schema!)run_in_isolated_tx; the @isolation procedure attribute is ignored through 0.14.0 and enforced since 0.14.1, see Transaction isolation), soft delete, rate limiting, validators, Decimal scalar, forward-only migrationscratestack-rusqlite) — sync API, bundled SQLite, exact-precision Decimal round-trip; works on native (mobile, desktop) and wasm32-unknown-unknown (browser, OPFS-backed) from the same sourceWARNING
CrateStack is usable today, but the public v0 track is narrower than the broader target architecture. COSE transport, parts of the client runtime, richer schema coverage, and some policy features are still deferred. Use Current State as the source of truth for adoption decisions.
.cstack field attribute surface, including exposure controls, validators, and @version. Upgrading to 0.8.0? The Cool* → Cratestack* rename and the new decimal = ... macro argument — both hard breaks, no deprecation window. This documentation tree is a standalone VitePress project. The framework code itself lives in a separate CrateStack repository.
Generated Rust API documentation is published at https://rust-doc.cratestack.dev/.