Packages
Postrust is published to crates.io as a set of crates, so you can run the whole server or depend on only the piece you need. All of them are released together and share a version.
| Crate | Role | Links |
|---|---|---|
postrust-server | HTTP server | |
postrust-core | Engine | |
postrust-sql | SQL builder | |
postrust-auth | Authentication | |
postrust-response | Response formatting | |
postrust-graphql | GraphQL | |
postrust-lambda | AWS Lambda | |
postrust-worker | Cloudflare Workers | |
postrust-proxy | Reverse proxy |
postrust-server
HTTP serverPostgREST-compatible REST and GraphQL API server for PostgreSQL, built on Axum.
- Ships the postrust binary — one executable, no runtime dependencies
- REST, GraphQL and an optional admin UI
- Configured entirely through environment variables
cargo install postrust-server --features admin-uipostrust-core
EngineRequest parsing, query planning and schema introspection for Postrust.
- Parses select, limit, offset, order, filters and embedding
- Introspects your schema and plans reads, mutations and RPC calls
- Builds parameterised SQL cast to the right column types
cargo add postrust-corepostrust-sql
SQL builderType-safe SQL fragment and statement builder used by Postrust.
- Composable SELECT, INSERT, UPDATE and DELETE builders
- Placeholder renumbering when fragments combine
- Identifier escaping and qualified names
cargo add postrust-sqlpostrust-auth
AuthenticationJWT authentication and role resolution for Postrust.
- Verifies JWTs with plain or base64 secrets
- Resolves the PostgreSQL role per request
- Passes claims through as GUCs for row-level security
cargo add postrust-authpostrust-response
Response formattingResponse formatting for Postrust: JSON, CSV, and OpenAPI output.
- Content negotiation between JSON and CSV
- Content-Range headers for pagination and counts
- OpenAPI description of the exposed schema
cargo add postrust-responsepostrust-graphql
GraphQLGraphQL API and realtime subscriptions generated from a PostgreSQL schema.
- Schema built from tables, views and relationships
- Queries, mutations, filtering and ordering
- Subscriptions over PostgreSQL LISTEN/NOTIFY
cargo add postrust-graphqlpostrust-lambda
AWS LambdaAWS Lambda adapter for Postrust, for serverless REST APIs over PostgreSQL.
- Runs behind a function URL or API Gateway
- Reuses the schema cache across warm invocations
cargo add postrust-lambdapostrust-worker
Cloudflare WorkersCloudflare Workers adapter for Postrust, for edge REST APIs over PostgreSQL.
- Compiles to WebAssembly for Cloudflare Workers
- Connects via Hyperdrive or a TCP-capable proxy
cargo add postrust-workerVersioning
All crates share the workspace version and are published together from a single v* tag, so any two Postrust crates at the same version are known to work together. Pin them to the same version in your Cargo.toml.