Clone this repo:
  1. fe87242 Merge pull request #2272 from weiznich/feature/pg_range_ops by Georg Semmler · 3 years, 7 months ago main master
  2. 968e7f7 Merge pull request #2376 from martell/chore/missing-nightly-update by Georg Semmler · 3 years, 7 months ago
  3. a19c6e3 Update nightly for unused_braces regression by Martell Malone · 3 years, 7 months ago
  4. 9d05d0e Update to a nightly that has clippy and rustfmt by Martell Malone · 3 years, 7 months ago
  5. c05e062 Fix intra doc link to diesel::sql_types by Martell Malone · 3 years, 7 months ago

A safe, extensible ORM and Query Builder for Rust

Build Status Azure Pipeline Build Status Appveyor Build Status Gitter

API Documentation: latest releasemaster branch


Diesel gets rid of the boilerplate for database interaction and eliminates runtime errors without sacrificing performance. It takes full advantage of Rust's type system to create a low overhead query builder that “feels like Rust.”

Supported databases:

  1. PostgreSQL
  2. MySQL
  3. SQLite

You can configure the database backend in Cargo.toml:

diesel = { version = "<version>", features = ["<postgres|mysql|sqlite>"] }

Getting Started

Find our extensive Getting Started tutorial at Guides on more specific features are coming soon.

Getting help

If you run into problems, Diesel has a very active Gitter room. You can come ask for help at For help with longer questions and discussion about the future of Diesel, visit our discourse forum.

Code of conduct

Anyone who interacts with Diesel in any space, including but not limited to this GitHub repository, must follow our code of conduct.


Licensed under either of these:


Before contributing, please read the contributors guide for useful information about setting up Diesel locally, coding style and common abbreviations.

Unless you explicitly state otherwise, any contribution you intentionally submit for inclusion in the work, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.