Query builders and ORMs

RecipeCratesCategories
SQLxsqlxcat-database
Dieseldieselcat-database
SeaORMsea-ormcat-database
Toastytoastycat-database

Sqlx

sqlx sqlx-github sqlx-lib.rs cat-database

sqlx⮳ is the Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.

Works with Postgres, MySQL, SQLite, and MS SQL. Supports compile time checking of queries. Async: supports both tokio and async-std.

SeaORM

sea-orm sea_orm-website sea_orm-cookbook cat-database

Seaography GraphQL server

Built on top of sqlx (see above). There is also a related sea-query crate that provides a query builder without full ORM functionality.

Diesel

diesel diesel-lib.rs cat-database

Has excellent performance and takes an approach of strict compile time guarantees. The main crate is Sync only, but diesel-async provides an async connection implementation.

Toasty

toasty toasty-crates.io toasty-github toasty-lib.rs

Toasty is an ORM for the Rust programming language that prioritizes ease-of-use. It supports both SQL datases as well as some NoSQL databases, including DynamoDB and Cassandra. Note that Toasty does not hide the database capabilities. Instead, Toasty exposes features based on the target database.

It is currently in active development and not yet published to crates.io. You can try using it directly from Github.