SQLx
Async, pure-Rust SQL toolkit with compile-time checked queries and no DSL
Repository Health
Technical Analysis
SQLx is an async, pure-Rust SQL crate that verifies your queries against a real development database at compile time — without imposing a query-builder DSL on top of SQL. You write plain SQL strings inside query!/query_as! macros, and SQLx connects to your dev database during the build to confirm the query is valid and infer the returned row’s shape.
It ships native, mostly-unsafe-free drivers for PostgreSQL, MySQL/MariaDB, and SQLite, is runtime-agnostic (works with tokio or async-std) and TLS-agnostic (native-tls or rustls), and adds connection pooling, row streaming, LISTEN/NOTIFY support, nested transactions with savepoints, and an offline mode for compiling without a live database connection.
What You Get
- Compile-time checked
query!/query_as!macros that validate SQL against your dev database and infer Rust types for returned rows - Native async drivers for PostgreSQL, MySQL/MariaDB, and SQLite (SQLite links libsqlite3 since it’s not a network database)
- Runtime-agnostic support for tokio and async-std, with native-tls or rustls TLS backends
- Built-in connection pooling (
sqlx::Pool), row streaming, and anAnydriver for choosing the backend at runtime via URL scheme - Offline mode (
sqlx-cli) soquery!macros can compile in CI without a live database connection - Compile-time embedded migrations via the
migrate!macro
Common Use Cases
- Backend services that want SQL-level control (window functions, CTEs, extension-specific syntax) with compile-time safety instead of an ORM’s abstraction
- Rust web APIs (Axum, Actix) needing a connection pool plus typed row mapping without hand-rolled
FromRowboilerplate - Projects that need to target multiple databases (Postgres in prod, SQLite in tests) through the
Anydriver - CI pipelines that need query-macro compile-time checks without provisioning a live database, via offline mode
Under The Hood
Architecture - SQLx is a Cargo workspace split into sqlx-core (the shared connection/pool/row abstractions and Executor/Connection traits), per-database driver crates (sqlx-postgres, sqlx-mysql, sqlx-sqlite) that implement those traits against each wire protocol, sqlx-macros/sqlx-macros-core (the proc-macro layer that talks to a dev database or offline query cache at compile time to type-check query!), and sqlx-cli for migrations and offline-mode cache generation; the top-level sqlx crate just re-exports the pieces selected by Cargo features. Tech Stack - pure Rust throughout except SQLite (which links the C libsqlite3 library via libsqlite3-sys, the one place unsafe is required); async execution is runtime-agnostic (tokio or async-std) and TLS is pluggable (native-tls or rustls), selected entirely through Cargo feature flags. Code Quality - the workspace carries an extensive tests/ directory per driver plus sqlx-test helpers, a clippy.toml enforcing lint conventions, and #![forbid(unsafe_code)] on non-SQLite builds, giving strong guarantees around one of Rust’s largest and most feature-flag-heavy crates; the sheer number of driver/runtime/TLS feature combinations does make the build matrix and CI surface large to reason about. API Design - the query!/query_as! macros give an unusually low-boilerplate path from a SQL string to a typed Rust value without a query-builder DSL to learn, though the tradeoff is that the compile-time-checking feature requires a live dev database (or a maintained offline cache file) in the build environment, which is an extra piece of infrastructure most ORMs don’t require.
Used by 17 apps in this directory
QuestDB
Analytics · Databases
A high-performance, open-source time-series database built for financial market data, IoT telemetry, and real-time analytics, combining a zero-GC Java/C++ core with SIMD-accelerated SQL and a WAL-to-Parquet storage engine.
Readur
Bookmarks Archiving · File Storage · Knowledge Management
A self-hosted document management system that OCRs, indexes, and makes every PDF, scan, and Office file instantly searchable.
Spacedrive
Collaboration · File Storage
One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.
Svix
Automation · Developer Tools
Open source, self-hostable webhook infrastructure that handles delivery, retries, HMAC signing, and multi-tenant event management so you never have to build a webhooks system from scratch.
tabularis
Databases · Developer Tools
Open-source desktop SQL workspace with built-in PostgreSQL, MySQL, and SQLite drivers, SQL notebooks, a visual query builder, and a built-in MCP server for AI agents like Claude and Cursor.
Temps
Analytics · Devops · Monitoring
A self-hosted Rust PaaS that replaces Vercel, Sentry, PostHog, Pingdom, Resend, and E2B with one binary — plus 440+ CLI operations agents like Claude Code can drive directly.
Vibe Kanban
AI Agents · AI Code Assistants · Project Management
A kanban board for planning work and dispatching Claude Code, Codex, Gemini CLI, and eight other coding agents into isolated git worktrees, then reviewing and merging their diffs from one UI.
Zed
Code Editors · Collaboration · Developer Tools
High-performance, multiplayer code editor built in Rust by the creators of Atom and Tree-sitter, with native AI integration and real-time collaboration.