Crates / Compare / sqlx vs tokio-postgres
Rust crates side by side · data Oct 24, 2026
sqlx vs tokio-postgres
Short answersqlx is the toolkit; tokio-postgres is the driver layer. By steady daily use, sqlx is bigger: 540,430 real downloads a day against 243,640 for tokio-postgres (2.2x). 4,124 crates depend on sqlx and 840 on tokio-postgres. sqlx last shipped 5 months ago, tokio-postgres 4 months ago.
sqlx
Widely usedWidely used and gaining.
4,124 crates depend on it; no release in the last 90 days, so its count is all steady use.
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.
tokio-postgres
EstablishedEstablished and gaining.
840 crates depend on it; no release in the last 90 days, so its count is all steady use.
A native, asynchronous PostgreSQL client
sqlxtokio-postgres · 100% = that crate's normal quiet day, so a spike to 300% is triple its usual traffic
Every number, side by side
| Same window, same method | sqlx | tokio-postgres |
|---|---|---|
| Real downloads a day | 540,430 | 243,640 |
| Crates that depend on it | 4,124 | 840 |
| Last release | 0.9.0, 5 months ago | 0.7.18, 4 months ago |
| Trend vs the field | +12% | +11% |
| Release-window share | 0.0% | 0.0% |
| Downloads in the window | 49,874,786 | 22,572,174 |
| All-time downloads | 172,259,351 | 79,071,322 |
| Versions published | 59 | 38 |
| License | MIT OR Apache-2.0 | MIT OR Apache-2.0 |
| MSRV | 1.94.0 | 1.85 |
| First published | Jun 6, 2019 | Dec 26, 2016 |
Which to pick
- Pick sqlx if you want pooling, migrations and compile-time checked queries across databases.
- Pick tokio-postgres if you want a lean, Postgres-only async driver and full control.
- Bottom line: sqlx is the toolkit; tokio-postgres is the driver layer. (checked against each project's docs, Oct 24, 2026)
- Downloads tell you what is common, not what fits. Each crate's own description above says what it is for; when the jobs differ, pick by the job.
- When both fit, prefer the one more crates depend on (sqlx, 4,124 dependents): more eyes, more answered questions, and you may already have it in your tree.
- Check the release dates against your own pace: sqlx 5 months ago, tokio-postgres 4 months ago.
Also in this space
Method
Real downloads = the median day with no release that day or the day before, from the crates.io API (Jul 27, 2026 to Oct 23, 2026). Raw crates.io counts include CI and bots and run high (why); the method is from our 90-day study. People search for this pair: Google suggests "sqlx vs tokio-postgres".
Up next
Another comparison: Same method, same window. Widely used and gaining vs established and gaining.sqlx vs dieselRead it next →Also worth your time