Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
sqlx
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite. (by launchbadge)
For me, tokio_postgres has never seemed like a drop-in replacement for sqlx. It just feels lower-level and it requires a bit more boilerplate to use. But I've been experimenting with Cornucopia as a layer on top of tokio_postgres and I think I like that workflow better than sqlx.
I'm developing a Rust web server backend in Axum that uses Postgres and performance will be pretty important since I plan to run it on one server for as long as possible. It seems like the postgres crate is about 2x faster than sqlx, and the postgres repository seems pretty active still.
Sqlx on the other hand seems to have slowed down a bit, with most commits happening back in September of last year. Also, apparently the next version (0.7) was already "taking longer than expected" almost 2 years ago, and still has not released.
Related posts
- SQLX MSSQL Connection String Problem
- SQLx 0.7 released! Offline mode usability improvements, performance fixes and major upgrades across the board!
- MariaDB / SQLx - "Unknown Authentication Plugin"
- What do you think about macros that use remote source to calculate its result?
- Ask HN: Why is there no database with a functional query language?