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.
# 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.
Secure by Design
PostgreSQL Row-Level Security (RLS) enforcement. JWT authentication with customizable role claims.
PostgREST Compatible
Drop-in replacement for PostgREST in most use cases. Same query syntax, same filtering operators.
Extensible
Add custom routes in Rust for webhooks, background jobs, and custom business logic.
Admin UI Included
Built-in Swagger UI, Scalar API docs, and GraphQL Playground. OpenAPI 3.0 spec auto-generated.
Single Binary
~3.5MB binary with no runtime dependencies. Deploy anywhere - Docker, Lambda, bare metal.
Built for speed and efficiency
Rust's zero-cost abstractions and efficient memory management make Postrust ideal for serverless deployments where cold start matters.
Why Serverless-First Matters
Single binary compiled with cargo-lambda, ~50ms cold start
LTO-optimized release build, no runtime dependencies
Deploy as native binary, skip container overhead
Benchmarks from project README. Run your own tests for production decisions.
| Feature | Postrust | PostgREST | Hasura |
|---|---|---|---|
| Cold Start (Lambda) | ~50ms | N/A* | N/A* |
| Binary Size | ~3.5 MB | ~20 MB | Container |
| Serverless | Native | Via containers | Cloud / containers |
| GraphQL | Built-in | Not supported | Built-in |
| Admin UI | Built-in | Not included | Cloud only |
| License | MIT | MIT | Apache 2.0 |
* PostgREST and Hasura typically run as containers, not native Lambda functions. Postrust can also run as a container if preferred.
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 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 deployRailway
Git-based deployment with zero config
$ 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.