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.

CrateRoleLinks
postrust-serverHTTP server
postrust-coreEngine
postrust-sqlSQL builder
postrust-authAuthentication
postrust-responseResponse formatting
postrust-graphqlGraphQL
postrust-lambdaAWS Lambda
postrust-workerCloudflare Workers
postrust-proxyReverse proxy

postrust-server

HTTP server
Start here

PostgREST-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-ui

postrust-core

Engine

Request 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-core

postrust-sql

SQL builder

Type-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-sql

postrust-auth

Authentication

JWT 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-auth

postrust-response

Response formatting

Response 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-response

postrust-graphql

GraphQL

GraphQL 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-graphql

postrust-lambda

AWS Lambda

AWS 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-lambda

postrust-worker

Cloudflare Workers

Cloudflare 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-worker

postrust-proxy

Reverse proxy

Reverse proxy for Postrust with load balancing and automatic TLS certificates.

  • Load balances across multiple Postrust backends
  • Automatic certificate issuance and renewal via ACME
  • Multi-tenant custom domains
cargo add postrust-proxy

Versioning

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.