VENTURESAurabase acquires & invests in your apps, startups, mobile apps, SaaS and software.Read more →

Engineering · 11 min read

Rust Backend-as-a-Service (BaaS): Why Aurabase Built a Full Postgres 18 BaaS in Rust

Affane Daylami · Founder ·

Back to blog

Developers looking for a Rust + PostgreSQL Backend-as-a-Service are routinely told to assemble a DIY stack with Axum, SQLx, Keycloak, Centrifugo, and MinIO. Aurabase eliminates that maintenance tax with a full, managed BaaS written from the ground up in Rust on top of dedicated PostgreSQL 18.

Quick answer: Aurabase is a full Rust Backend-as-a-Service (BaaS) built on dedicated PostgreSQL 18 (CloudNativePG). Rather than stitching together a DIY stack (Axum + SQLx + Keycloak + Centrifugo + S3) or operating a polyglot Node/Go/Elixir/PHP cluster, Aurabase runs all 7 backend products inside a unified Rust workspace with zero garbage-collector pauses, native WebAssembly (Wasmtime) Edge Functions, an official crates.io Rust SDK, and 100% EU sovereignty.

#

Why the gap existed

Why pre-packaged Rust BaaS platforms were almost non-existent

Search for a "Rust PostgreSQL BaaS" and most recommendations fall back to two extremes: either PocketBase (written in Go on embedded SQLite — great for single-node indie tools, but not PostgreSQL) or DIY Rust (combining Axum, SQLx/SeaORM, Logto/Keycloak, Centrifugo, and an S3 gateway).

Assembling a DIY Rust stack works until production requirements arrive: OAuth 2.1 with 15 providers, WebAuthn Passkeys, TOTP MFA, ES256 JWKS rotation, bulk bcrypt/Argon2id user import, Postgres CDC filtered by Row-Level Security, HMAC signed S3 uploads, cron-scheduled Edge Functions, ClickHouse slow-query observability, and automated backups. Maintaining that plumbing easily consumes 6–12 months of senior engineering before you ship your actual product.

#

Inside the Workspace

Anatomy of Aurabase's unified Rust microservices

Every core service in Aurabase compiles from a single Rust workspace sharing internal crates (aura-core, aura-crypto, aura-db-adapters, aura-migrations, aura-telemetry):

  • aura-gateway: dual-listener Axum gateway separating the tenant Data Plane and Management Plane, with sliding-window rate limiting, circuit breakers, and JWT verification.
  • aura-auth: OAuth 2.1 (15 providers), WebAuthn Passkeys, TOTP MFA, Magic Links, RBAC, RFC 8693 user impersonation, and Argon2id/bcrypt bulk import.
  • aura-db & aura-provisioner: CloudNativePG orchestration provisioning dedicated PostgreSQL 18 instances with PgBouncer transaction pooling, pgvector, pg_graphql, and PostgREST compatibility.
  • aura-realtime: WebSockets & SSE over NATS JetStream with RLS-filtered Postgres CDC, Presence, Broadcast, and 60s event replay.
  • aura-storage: S3-compatible REST API on SeaweedFS with HMAC signed URLs, on-the-fly image transforms, and per-path RLS.
  • aura-functions & aura-edge-runtime: Deno/TypeScript V8 isolates and native precompiled WebAssembly (Wasmtime) binaries with Vault-encrypted secrets and cron jobs.
  • aura-ai & aura-notifications: multi-provider AI Gateway (OpenAI, Anthropic, Gemini), pgvector HNSW RAG, sqlparser AST-verified read-only NL2SQL, plus email/SMS/push notifications.
Zero-panic production architecture

Aurabase enforces a strict zero-panic policy across production Rust services: no .unwrap() or .expect() in request handlers, parking_lot non-poisoning locks, bounded HTTP timeouts, CatchPanicLayer on Axum routers, and structured tracing telemetry.

#

Comparison

Rust BaaS vs. DIY Rust vs. Go / Node / PHP BaaS

CriterionAurabaseDIY Rust (Axum + SQLx)PocketBaseSupabaseAppwrite
Core runtime100% Rust (Axum, Tokio, SQLx, Wasmtime)RustGoGo, Elixir, Node, HaskellPHP/Swoole, Node
GC tail-latency pausesNone (zero GC)NoneGo GCMulti-runtime GCPHP/Node GC
DatabaseDedicated PostgreSQL 18 + optional --engine mongodbSelf-managed PostgresEmbedded SQLitePostgreSQLMariaDB / Postgres
Auth, Storage, Realtime, EdgeAll 7 products built inBuild & maintain yourselfAuth, Storage, RealtimeBuilt inBuilt in
WASM Edge FunctionsYes (Wasmtime + Deno)DIYNoDeno onlyContainers
AI & Coding Agents86 MCP tools (37 read-only) + AST NL2SQLDIYNoneMCP serverMCP server
EU SovereigntyFrance (Aurabase SAS) · Scaleway & HetznerSelf-hostedSelf-hostedUS parent (AWS)Global / self-hosted
#

Developer Experience

Use Aurabase from Rust (crates.io) or TypeScript (npm)

# Official Rust crate (async Tokio)
cargo add aurabase

# Official TypeScript / JavaScript SDK
npm install @aurabase/aurabase-js

# Rust-compiled CLI
npm install -g @aurabase/cli
import { createClient } from '@aurabase/aurabase-js'

const aura = createClient(
  process.env.NEXT_PUBLIC_AURABASE_URL!,
  process.env.NEXT_PUBLIC_AURABASE_ANON_KEY!,
)

const { data: orders, error } = await aura
  .from('orders')
  .select('id, status, total_cents')
  .eq('status', 'paid')
  .limit(20)
#

Editorial Honesty

When DIY Rust or PocketBase still makes sense

  • Pick DIY Rust (Axum + SQLx) if your core business is custom low-level protocol engineering (game servers, trading engines, bespoke streaming brokers) where a standard BaaS data model gets in the way.
  • Pick PocketBase for tiny single-VPS tools that fit comfortably inside one SQLite file.
  • Pick Aurabase when you want PostgreSQL 18 + Rust performance + zero DevOps + EU sovereignty out of the box.

Explore our reproducible k6 & Criterion benchmarks and architecture documentation.

#

Frequently Asked Questions

FAQs

Is there a complete Backend-as-a-Service written in Rust?+
Yes. Aurabase is a unified Backend-as-a-Service built in a single Rust workspace (Axum, Tokio, SQLx, Wasmtime) on top of dedicated PostgreSQL 18 orchestrated via CloudNativePG, delivering all 7 integrated products (Database, Auth, Realtime CDC, S3 Storage, Edge Functions, Notifications, AI Gateway) plus an 86-tool MCP server.
Why build a BaaS in Rust instead of Go, Node.js, or Elixir?+
Rust eliminates garbage-collector stop-the-world pauses, keeping p95/p99 API gateway latency predictable under multi-tenant bursts while using significantly less RAM per microservice — allowing denser, more cost-efficient tenant isolation.
How does Aurabase compare to PocketBase or a DIY Axum + SQLx stack?+
PocketBase is a single Go binary on embedded SQLite, ideal for small single-node apps without PostgreSQL. A DIY Axum + SQLx stack gives full control but forces you to build and patch Auth, OAuth 2.1, Passkeys, RLS, CDC WebSockets, S3 signing, Edge Functions, and backups yourself. Aurabase gives you Rust performance with all 7 BaaS products managed in Europe.
Does Aurabase have an official Rust SDK?+
Yes. The official aurabase crate is published on crates.io (cargo add aurabase) with async Tokio support, alongside @aurabase/aurabase-js for TypeScript/JavaScript and the Rust-built aura CLI.
Can Edge Functions run compiled Rust/WASM?+
Yes. Aurabase Edge Functions support both Deno/TypeScript (V8 isolates) and precompiled WebAssembly binaries executed on Wasmtime.

READY TO DEPLOY?

Your backend in five minutes.

No credit card required · 500 MB free · 50,000 MAU