Thoughts about switching from sqlx to tokio_postgres?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • cornucopia

    Generate type-checked Rust from your PostgreSQL.

  • 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.

  • metrics

  • 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.

  • 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.

    WorkOS logo
  • 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)

  • 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.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts