Crates / Compare / sqlx vs diesel
Rust crates side by side · data Oct 24, 2026
sqlx vs diesel
Short answersqlx is SQL-first and async; diesel is DSL-first and strongly typed. By steady daily use, sqlx is bigger: 540,430 real downloads a day against 107,307 for diesel (5.0x). 4,124 crates depend on sqlx and 667 on diesel. sqlx last shipped 5 months ago, diesel 17 days 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.
diesel
EstablishedEstablished and gaining.
667 crates depend on it; downloads don't spike on releases.
A safe, extensible ORM and Query Builder for PostgreSQL, SQLite, and MySQL
sqlxdiesel · 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 | diesel |
|---|---|---|
| Real downloads a day | 540,430 | 107,307 |
| Crates that depend on it | 4,124 | 667 |
| Last release | 0.9.0, 5 months ago | 2.3.14, 17 days ago |
| Trend vs the field | +12% | +23% |
| Release-window share | 0.0% | 6.6% |
| Downloads in the window | 49,874,786 | 10,314,510 |
| All-time downloads | 172,259,351 | 41,862,888 |
| Versions published | 59 | 99 |
| License | MIT OR Apache-2.0 | MIT OR Apache-2.0 |
| MSRV | 1.94.0 | 1.86.0 |
| First published | Jun 6, 2019 | Nov 29, 2015 |
Which to pick
- Pick sqlx if you like writing SQL, want async, and want queries checked against your real database at compile time.
- Pick diesel if you want a type-safe query builder and ORM, and sync code is fine (or you add diesel-async).
- Bottom line: sqlx is SQL-first and async; diesel is DSL-first and strongly typed. (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, diesel 17 days 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 diesel".
Up next
Another comparison: Same method, same window. Widely used and gaining vs established and steady.sqlx vs sea-ormRead it next →Also worth your time