#164164th of 275 in Backends, databases and hosting

sqlx

Async Rust SQL toolkit with compile-time checked queries and no DSL

Releases and problems feed (RSS)

Stars
17.7k
License
Apache-2.0
Last commit
Nov 2026
Language
Rust
Stars, last 29 weeks+937
28 Apr 2026: 16,758 stars5 May 2026: 16,787 stars12 May 2026: 16,829 stars19 May 2026: 16,870 stars26 May 2026: 16,904 stars2 Jun 2026: 16,964 stars9 Jun 2026: 17,005 stars16 Jun 2026: 17,037 stars23 Jun 2026: 17,087 stars30 Jun 2026: 17,122 stars7 Jul 2026: 17,156 stars14 Jul 2026: 17,207 stars21 Jul 2026: 17,229 stars28 Jul 2026: 17,269 stars4 Aug 2026: 17,290 stars11 Aug 2026: 17,314 stars18 Aug 2026: 17,335 stars25 Aug 2026: 17,365 stars1 Sept 2026: 17,388 stars8 Sept 2026: 17,411 stars15 Sept 2026: 17,435 stars22 Sept 2026: 17,452 stars29 Sept 2026: 17,478 stars6 Oct 2026: 17,517 stars13 Oct 2026: 17,543 stars20 Oct 2026: 17,568 stars27 Oct 2026: 17,596 stars3 Nov 2026: 17,621 stars10 Nov 2026: 17,654 stars17 Nov 2026: 17,695 stars

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

Reported, then fixed by a linked change

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
Also in Backends, databases and hosting
RankProjectScore
1bunJavaScript and TypeScript runtime with bundler, test runner and package manager96.8k starscustom license94 out of 100
2coolifySelf-hosted Heroku and Vercel alternative that deploys apps and databases over SSH66.2k stars+3,121 (+4.9%) in 30 daysApache-2.093 out of 100
3traefikHTTP reverse proxy and load balancer that auto-discovers routes from orchestrators65.6k starsMIT93 out of 100
#4appwriteBackend with auth, databases, storage, functions and an MCP server for agents Live demo ↗ (opens in a new tab)58.4k stars+641 (+1.1%) in 30 daysBSD-3-Clause93 out of 100
#5medusaNode.js commerce platform with modular products, carts, orders and payments37.3k starscustom license93 out of 100