PostgreSQL API
in Milliseconds
High-performance REST & GraphQL API server for PostgreSQL, written in Rust. Native AWS Lambda support with ~50ms cold starts. Drop-in PostgREST replacement, and it speaks Hasura’s GraphQL dialect. Both measured against the servers they replace.
# Start in seconds with Docker
$ docker run -p 3000:3000 \
-e DATABASE_URL="postgres://..." \
postrust/postrust
# Your API is ready!
$ curl localhost:3000/users
[{"id":1,"name":"Alice"},{"id":2,"name":"Bob"}]Everything you need to build APIs
Postrust provides a complete solution for exposing your PostgreSQL database as a secure, high-performance API. No boilerplate, no ORM, just your schema.
Blazing Fast
Written in Rust for maximum performance. Sub-millisecond response times and minimal memory footprint.
Serverless-First
Native support for AWS Lambda. Single binary with ~50ms cold starts. No container overhead.
GraphQL Built-in
Full GraphQL API alongside REST. Queries, mutations, filtering, and nested relationships out of the box.
Realtime Subscriptions
Live updates via GraphQL subscriptions. Subscribe to any query or view changes with PostgreSQL LISTEN/NOTIFY.
pgvector Integration
Native vector similarity search. Build AI-powered apps with embeddings, semantic search, and RAG pipelines.
Custom Routes in Rust
Define custom endpoints in pure Rust. Full access to Axum handlers, middleware, and the database pool.
Secure by Design
PostgreSQL Row-Level Security (RLS) enforcement. JWT authentication with customizable role claims.
PostgREST Compatible
Same query syntax and filtering operators. An opt-in compatibility mode serves canonical PostgREST paths and response shapes for drop-in migrations.
Admin UI Included
Built-in Swagger UI, Scalar API docs, and GraphQL Playground. OpenAPI 3.0 spec auto-generated.
Single Binary
~5MB binary with no runtime dependencies. Deploy anywhere - Docker, Lambda, bare metal.
Intuitive API, powerful results
Whether you prefer REST or GraphQL, Postrust provides a clean, consistent API that's easy to use and powerful enough for production.
# Get active users with pagination
curl "localhost:3000/users?status=eq.active&limit=10&offset=0"
# Response
[
{"id": 1, "name": "Alice", "email": "alice@example.com"},
{"id": 2, "name": "Bob", "email": "bob@example.com"}
]# Get orders with customer and items
curl "localhost:3000/orders?select=*,customer(name,email),items(product(name,price))"
# Response
[{
"id": 1,
"total": 99.99,
"customer": {"name": "Alice", "email": "alice@example.com"},
"items": [{"product": {"name": "Widget", "price": 49.99}}]
}]Launch your SaaS in days, not months
A production-ready starter kit built on Postrust with authentication, team management, billing, and everything you need to ship fast.
Authentication
Magic link and OAuth with Google & GitHub
Team Management
Create teams, invite members, manage roles
Billing
Stripe & LemonSqueezy subscription management
API Keys
Generate and manage programmatic access
Row Level Security
PostgreSQL RLS policies built-in
Audit Logs
Track all team actions for compliance
Deploy anywhere in minutes
From Docker to serverless, Postrust runs wherever you need it. Single binary with zero runtime dependencies.
Docker
Container-based deployment for any environment
$ docker run -p 3000:3000 -e DATABASE_URL=... postrust/postrustAWS Lambda
Serverless deployment with native adapter
$ cargo lambda build --release -p postrust-lambdaKubernetes
Production-ready with health checks and scaling
$ helm install postrust ./charts/postrustFly.io
Global edge deployment in minutes
$ fly launchRailway
Git-based deployment, builds the Dockerfile
$ railway init && railway upBinary
Single binary for bare metal servers
$ cargo build --release -p postrust-serverReady to build faster APIs?
Get started with Postrust in minutes. Join developers building high-performance PostgreSQL APIs with Rust.