Now with GraphQL support

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.

Terminal
# 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"}]
MIT Licensed
~50ms Lambda Cold Start
REST + GraphQL

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.

Performance

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

Native AWS Lambda Support

Single binary compiled with cargo-lambda, ~50ms cold start

3.5 MB Binary

LTO-optimized release build, no runtime dependencies

No Container Required

Deploy as native binary, skip container overhead

Benchmarks from project README. Run your own tests for production decisions.

~50ms
Lambda cold start
3.5 MB
Binary size
REST+
GraphQL built-in
0
Runtime dependencies
Feature
Postrust
PostgRESTHasura
Cold Start (Lambda)~50msN/A*N/A*
Binary Size~3.5 MB~20 MBContainer
ServerlessNativeVia containersCloud / containers
GraphQLBuilt-inNot supportedBuilt-in
Admin UIBuilt-inNot includedCloud only
LicenseMITMITApache 2.0

* PostgREST and Hasura typically run as containers, not native Lambda functions. Postrust can also run as a container if preferred.

Developer Experience

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.

Query with Filters
# 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"}
]
Nested Resources
# 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}}]
}]
SaaS Starter Kit

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.

Built with:Next.jsPostrustPostgreSQLTailwind CSS

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

Deployment

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/postrust

AWS Lambda

Serverless deployment with native adapter

$ cargo lambda build --release -p postrust-lambda

Kubernetes

Production-ready with health checks and scaling

$ helm install postrust ./charts/postrust

Fly.io

Global edge deployment in minutes

$ fly deploy

Railway

Git-based deployment with zero config

$ railway up

Binary

Single binary for bare metal servers

$ cargo build --release -p postrust-server
Open Source & MIT Licensed

Ready to build faster APIs?

Get started with Postrust in minutes. Join developers building high-performance PostgreSQL APIs with Rust.