#164164th of 275 in Backends, databases and hosting
sqlx
Async Rust SQL toolkit with compile-time checked queries and no DSL
- Stars
- 17.7k
- License
- Apache-2.0
- Last commit
- Nov 2026
- Language
- Rust
16,758 on 28 Apr 202617,695 on 17 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
SQLx is a Rust crate for talking to PostgreSQL, MySQL/MariaDB and SQLite using async/await on tokio or async-std. Queries are plain SQL; the query macros connect to a development database at build time to verify syntax and types. It includes connection pooling, row streaming, statement caching, migrations and an Any driver, but it is not an ORM.
Who it is for: Rust developers writing async database access without an ORM
Strengths
- Compile-time checked SQL via the query macros, verified by a development database
- Postgres and MySQL drivers in pure Rust with forbid(unsafe_code)
- Runs on tokio or async-std, with native-tls or rustls backends
- Built-in pooling, nested transactions, LISTEN/NOTIFY, migrations and offline query cache
Weaknesses
- Not an ORM; no query builder or model layer
- Query macros need DATABASE_URL at build time or a prepared offline cache
- MSSQL support was removed in 0.7 pending a driver rewrite
- Must pick runtime and TLS feature flags from many combinations
What it needs
- no GPU
- Needs PostgreSQL, MySQL/MariaDB or SQLite, Rust toolchain, tokio or async-std
Known problems
Open now, reported in the last 90 days
- `Migrator::run` keeps the Postgres advisory lock when it returns an error ↗ (opens in a new tab)2 reactions
Reported, then fixed by a linked change
- sqlx-cli regression in 0.9.0: role "anonymous" does not exist ↗ (opens in a new tab)5 reactions · closed 10 Jun 2026Fixed by fix: whoami regression to anonymous user ↗ (opens in a new tab)
- ERROR: cached plan must not change result type ↗ (opens in a new tab)4 reactions · closed 9 Sept 2026Fixed by [PostgreSQL] Invalided stale prepared statements ↗ (opens in a new tab)
- ColumnNotFound error when querying with MySQL ↗ (opens in a new tab)3 reactions · closed 8 Apr 2026Fixed by fix(mysql): Work around for Issue #2206 (ColumnNotFound error when querying) ↗ (opens in a new tab)
- 100% CPU in sqlx_core::pool::inner::spawn_maintenance_tasks ↗ (opens in a new tab)2 reactions · closed 10 Sept 2026Fixed by fix(pool): prevent num_idle underflow that wedges maintenance in a CPU spin ↗ (opens in a new tab)
- AnyQueryResult does not map last_insert_id correct ↗ (opens in a new tab)2 reactions · closed 19 Aug 2026Fixed by bugfix: streamline and fix AnyQueryResult::last_insert_id() for SQLite ↗ (opens in a new tab)
Titles are the reporters' own words, taken from the project's GitHub issues and ranked by reactions. We have not tried to reproduce any of them.
Also in Backends, databases and hosting
See all 275| Rank | Project | Score |
|---|---|---|
| 1 | bunJavaScript and TypeScript runtime with bundler, test runner and package manager | 94 out of 100 |
| 2 | coolifySelf-hosted Heroku and Vercel alternative that deploys apps and databases over SSH | 93 out of 100 |
| 3 | traefikHTTP reverse proxy and load balancer that auto-discovers routes from orchestrators | 93 out of 100 |
| #4 | appwriteBackend with auth, databases, storage, functions and an MCP server for agents | 93 out of 100 |
| #5 | medusaNode.js commerce platform with modular products, carts, orders and payments | 93 out of 100 |