Skip to content

Diesel is a Safe, Extensible ORM and Query Builder for Rust

Diesel is the most productive way to interact with databases in Rust because of its safe and composable abstractions over queries.

Preventing Runtime Errors

We don't want to waste time tracking down runtime errors. We achieve this by having Diesel eliminate the possibility of incorrect database interactions at compile time.

Built for Performance

Diesel offers a high level query builder and lets you think about your problems in Rust, not SQL. Our focus on zero-cost abstractions allows Diesel to run your query and load your data even faster than C.

Productive and Extensible

Unlike Active Record and other ORMs, Diesel is designed to be abstracted over. Diesel enables you to write reusable code and think in terms of your problem domain and not SQL.

Still not sold? Have a look at an in-depth comparison with other rust database crates.

Simple queries are a complete breeze. Loading all users from a database:

Rust
users::table.load(&mut connection)
Executed SQL
SELECT * FROM users;

Loading all the posts for a user:

Rust
Post::belonging_to(user).load(&mut connection)
Executed SQL
SELECT * FROM posts WHERE user_id = 1;

The Diesel project is always looking for people to help with various parts of the project. If you would like to help here are different ways to contribute to the project:

  • Contributing Code, Documentation or Guides. Checkout the planning for Diesel 2.4 for open tasks.
  • Providing knowledge and help to maintain the MySQL/MariaDB backend. This is currently the only in-tree backend that is not used by any maintainers, so having someone around that actually uses this backend would be very helpful for the Diesel project.
  • Answering questions in our discussion forum.
  • Reporting bugs in our issue tracker.
  • Helping triaging issues in our issue tracker.
  • Sponsoring the maintainers.


We would like to thank all of the sponsors supporting the work on Diesel. Notable large sponsors are:

Additionally we would like to thank all persons sponsoring the project on GitHub. Without them developing Diesel wouldn’t be possible.

Found a mistake on this website? Submit an issue or send a pull request here!


Copyright © 2015-2026 The Diesel Core Team