Reviews of the Diesel ORM, are there better alternatives?

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

    A safe, extensible ORM and Query Builder for Rust

  • Link: https://diesel.rs/

  • diesel_async

    Diesel async connection implementation

  • i don't see why you or anyone else would consider it too big of an issue that Diesel doesn't have async. For those who really want async diesel right now, the author already released diesel_async as a stop-gap solution, but even without that there's nothing wrong with using spawn_blocking. It feels worse than it really is to use blocking thread pools; until io_uring is a thing, there's no real getting around the necessity of threads being blocked for I/O and so adding async to the mix doesn't magically make things faster.

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

    Generate type-checked Rust from your PostgreSQL.

  • I've used Diesel, SQLx and Cornucopia https://github.com/LouisGariepy/cornucopia

  • rust-mysql-simple

    Mysql client library implemented in rust.

  • I can understand that this can be frustrating and I know that the situation there is not ideal for diesel. There are certainly things to improve there by either providing a bundling support which builds the native library as part of the normal build process or by implementing a pure rust connection implementation. Both is possible with diesel, but requires some work. At least the pure rust connection implementation is something that can be provided by a third party crate now with upcoming diesel 2.0 release. If you are interested in that checkout this and this issue. As for the bundling support: This requires changes in the mysqlclient-sys and pq-sys crates. Again help there is welcome. In the end it makes me sad that some people have repeating decided that a solution to this problem is to write just another crate instead of helping to fix these issues. This just results in everyone have more work to do, as there are now two non-perfect solutions instead of having one slightly improved solution.

  • rust-postgres

    Native PostgreSQL driver for the Rust programming language

  • I can understand that this can be frustrating and I know that the situation there is not ideal for diesel. There are certainly things to improve there by either providing a bundling support which builds the native library as part of the normal build process or by implementing a pure rust connection implementation. Both is possible with diesel, but requires some work. At least the pure rust connection implementation is something that can be provided by a third party crate now with upcoming diesel 2.0 release. If you are interested in that checkout this and this issue. As for the bundling support: This requires changes in the mysqlclient-sys and pq-sys crates. Again help there is welcome. In the end it makes me sad that some people have repeating decided that a solution to this problem is to write just another crate instead of helping to fix these issues. This just results in everyone have more work to do, as there are now two non-perfect solutions instead of having one slightly improved solution.

  • mysqlclient-sys

    Rust bindings for libmysqlclient

  • I can understand that this can be frustrating and I know that the situation there is not ideal for diesel. There are certainly things to improve there by either providing a bundling support which builds the native library as part of the normal build process or by implementing a pure rust connection implementation. Both is possible with diesel, but requires some work. At least the pure rust connection implementation is something that can be provided by a third party crate now with upcoming diesel 2.0 release. If you are interested in that checkout this and this issue. As for the bundling support: This requires changes in the mysqlclient-sys and pq-sys crates. Again help there is welcome. In the end it makes me sad that some people have repeating decided that a solution to this problem is to write just another crate instead of helping to fix these issues. This just results in everyone have more work to do, as there are now two non-perfect solutions instead of having one slightly improved solution.

  • pq-sys

    Auto-generated rust bindings for libpq

  • I can understand that this can be frustrating and I know that the situation there is not ideal for diesel. There are certainly things to improve there by either providing a bundling support which builds the native library as part of the normal build process or by implementing a pure rust connection implementation. Both is possible with diesel, but requires some work. At least the pure rust connection implementation is something that can be provided by a third party crate now with upcoming diesel 2.0 release. If you are interested in that checkout this and this issue. As for the bundling support: This requires changes in the mysqlclient-sys and pq-sys crates. Again help there is welcome. In the end it makes me sad that some people have repeating decided that a solution to this problem is to write just another crate instead of helping to fix these issues. This just results in everyone have more work to do, as there are now two non-perfect solutions instead of having one slightly improved solution.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • rbatis

    Rust Compile Time ORM robustness,async, pure Rust Dynamic SQL

  • try https://github.com/rbatis/rbatis

  • ormlite

    An ORM in Rust for developers that love SQL.

  • It’s extremely young, but I created Ormlite (https://github.com/kurtbuilds/ormlite) because I wanted a lightweight ORM that doesn’t involve learning a custom DSL. Like seaorm, it builds on sqlx and is fully async.

  • prisma-client-rust

    Type-safe database access for Rust

  • I've been using prisma client rust instead of seaorm lately and have been very happy

  • bb8

    Full-featured async (tokio-based) postgres connection pool (like r2d2)

  • The current bb8 implementation (0.7 and 0.8) seam to sport a rather serious bug that can lead to deadlocks under load: https://github.com/djc/bb8/issues/122

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