For more reasons than we have time to explore in this post, Rust is rapidly gaining popularity in the developer community. One of its selling points is that it supports all major databases and storage formats — from file-based storage platforms, to memory-based and hybrid databases.
In this guide, we’ll compare 11 of the most popular and stable database drivers and ORMs available for Rust. At the end, we’ll compile all the key takeaways in a convenient table to help you choose the right database for your next Rust project.
The Replay is a weekly newsletter for dev and engineering leaders.
Delivered once a week, it's your curated guide to the most important conversations around frontend dev, emerging AI tools, and the state of modern software.
A database driver is a piece of code that performs communication between the application and the database. It implements protocols and formats for data exchange between application and database.
mysqlMySQL is a very popular database and the first choice for most applications that use the SQL database. The mysql crate provides a pure Rust implementation of the MySQL protocol. It supports both text-based and binary protocols.
mysql supports caching of statements as well as pools of connections. TLS is supported via the nativetls crate. The crate uses the params for creating rows. One downside is that MySQL does not have async support.
mysql_asyncAs you might’ve guessed, mysql_async is an async version of the mysql driver. It has a lot of APIs that are similar to those found in mysql, but it may not have some new features since the crates are maintained by different developers.
mysql_async has full support for MySQL protocol, including TLS-based encryption. mysql_async crate also allows you to maintain a connection pool. This crate is written in pure Rust.
tokio_postgresAsync Support: Yes
Postgres is a very popular database. Rust has an async implementation for the Postgres protocol that is built on top of tokio async runtime, but it can work with other runtimes as well.
The execution of queries is fully pipelined — i.e., the drivers can send multiple queries. That means tokio-postgres can process multiple data responses simultaneously. It also supports TLS using nativetls. The driver doesn’t have a connection pool support since multiple queries can be sent on the same connection.
tokio_postgres has multiple wrappers for various configs, such as a sync version of the driver, an OpenSSL version, native_tls version, and many more.
There are also several other crates that feature various additions, including:
postgres-typespostgres-native-tlspostgres-opensslpostgresredisRedis is an in-memory database that can be used for creating caches, worker queues, and microservices. Rust has excellent support for the Redis database. The redis crate provides both high- and low-level APIs. All the queries are pipelined, meaning multiple queries can be sent simultaneously.
redis has a full implementation of the Redis communication protocol. Support for pub/sub is still in the works. redis uses tokio as async runtime. This crate supports Lua scripts, auto-reconnect, and connection pool using the r2d2 crate.
rusqliteAsync Support: No
SQLite is an in-process database with SQL support that is used by multiple platforms for maintaining data stores. Android applications often use SQLite as a local database.
Rust has a wrapper around the SQLite C driver. The rusqlite crate uses bindgen to create the wrapper, which can result in long compile time. rusqlite is a safe wrapper around the SQLite wrapper. It also supports hooks such as commit, insert, etc.
rusqlite does not include async support.
leveldbCreated by Google, LeveDB is a key-value store and a key-value store only. It’s not an SQL database; it’s is more like NoSQL.
Many databases use LevelDB as a storage engine. Chrome uses LevelDB to implement IndexDB.
The leveldb crate provides a safe binding for LevelDB. Like rusqlite, it may increase compile time since it uses bindgen. Also like rusqlite, there is no async support.
mongodbMongoDB is a NoSQL database. Rust has an official MongoDB driver with async support. It’s written in pure Rust using tokio runtime for async support.
mongodb has support for aggregation as well as various database operations. It uses the bson crate to create a BSON document. As of this writing, transactions are not supported.
memcacheMemcached is a free, open-source, high-performance, distributed memory object caching system. memcache is a Memcached client written in pure Rust. It supports multiple instances of Memcached. Some features, including auto JSON serialization and compression, aren’t available yet.
cdrsAsync Support: No
Cassandra is a distributed, scalable SQL database. crdrs is a database driver for Cassandra and ScyllaDB.
The crate provides a full implementation of Cassandra protocol and supports clusters. It also supports TLS using nativetls.
cdrs-async is an async version of the cdrs crate based on tokio async runtime.
An object relational mapper (ORM) maps stable rows with Rust structs. ORMs provide support for multiple SQL databases. Many are complete database solutions that include multiple database drivers, connection pool support, and migration tooling. Below are two of the most popular.
dieselAsync Support: No
diesel is an ORM for Postgres, MySQL, and SQLite. It provides a migration utility called diesel_cli. diesel is type-safe, meaning table types are created using migration files. Its goal is to produce identical behavior on multiple databases.
diesel doesn’t have async support, and the group by query is not well-supported. On stable Rust, the error is a bit weird due to lack of support for procedural macros. It can include long nested types.
Drivers can be changed for a database. The connection pool is supported via r2d2.
quaintquaint is an ORM that supports async operations. It provides AST for creating queries at runtime.
quaint supports multiple SQL databases, including MySQL, Postgres, and SQLite, as well as the connection pool. It’s not a database type-safe ORM.
The Rust community has built some awesome tools for managing database migrations, a few of which are ORM-independent. The best solution for you will depend on the goals and requirements of your project.
To help you make an informed selection, we’ve compiled the key takeaways, pros, cons, and features associated with each database driver and ORM described above (plus a few more) in a convenient table.
| Name | Type | Prod.-ready? | Async support? | Pure Rust? | Pros | Cons | Notes | Maintenance |
mysql |
Driver | Yes | No | Yes |
|
|
|
Active |
mysql_async |
Driver | Yes | Yes | Yes |
|
|
|
Active |
tokio_postgres |
Driver | Yes | Yes | Yes |
|
|
|
Active |
redis |
Driver | Yes | Yes | Yes |
|
|
|
Active |
rusqlite |
Driver | Yes | No | No |
|
|
|
Active |
leveldb |
Driver | Yes | No | No |
|
|
|
Active |
mongodb |
Driver | Yes | Yes | Yes |
|
|
|
Active |
memcache |
Driver | Yes | No | Yes |
|
|
|
Active |
cdrs |
Driver | Yes | No | Yes |
|
|
– Async version available (cdrs-async) |
Active |
diesel |
ORM | Yes | No | Yes |
|
|
|
Active |
quaint |
ORM | Yes | Yes | Yes |
|
|
Active | |
rustorm |
ORM | No | No | Yes |
|
|
|
Active |
tql |
ORM | No | No | Yes |
|
|
|
Active |
migrant |
Tool | Yes | N/A | Yes |
|
|
Passive | |
refinery |
Tool | Yes | Yes | Yes |
|
Active |
Debugging Rust applications can be difficult, especially when users experience issues that are hard to reproduce. If you’re interested in monitoring and tracking the performance of your Rust apps, automatically surfacing errors, and tracking slow network requests and load time, try LogRocket.
LogRocket lets you replay user sessions, eliminating guesswork around why bugs happen by showing exactly what users experienced. It captures console logs, errors, network requests, and pixel-perfect DOM recordings — compatible with all frameworks.
LogRocket's Galileo AI watches sessions for you, instantly identifying and explaining user struggles with automated monitoring of your entire product experience.
Modernize how you debug your Rust apps — start monitoring for free.

Examine AgentKit, Open AI’s new tool for building agents. Conduct a side-by-side comparison with n8n by building AI agents with each tool.

AI agents powered by MCP are redefining interfaces, shifting from clicks to intelligent, context-aware conversations.

Learn how platform engineering helps frontend teams streamline workflows with Backstage, automating builds, documentation, and project management.

Build an AI assistant with Vercel AI Elements, which provides pre-built React components specifically designed for AI applications.
Hey there, want to help make our blog better?
Join LogRocket’s Content Advisory Board. You’ll help inform the type of content we create and get access to exclusive meetups, social accreditation, and swag.
Sign up now
3 Replies to "11 database drivers and ORMs for Rust that are ready for production"
Hello guys! Thanks a lot for the article, pretty nice overview! However I doubt quaint is production ready, as you claim here. At least according to what docs.rs says, it’s not intended to be used in production, yet. Do you have different experience on that? Are you guys using it in production already?
Best regards, Tim
Worth a mention is sqlx (https://github.com/launchbadge/sqlx). (Optional) SQL checked at compile time against a database connection, fully async, DB agnostic. Nice balance between a full ORM and runtime-checked SQL.
Quaint is not an ORM library, and the quaint docs specifically state that it is not their goal to create one.