#110110th of 275 in Backends, databases and hosting
diesel
Type-checked ORM and query builder for Rust
- Stars
- 14.3k
- License
- Apache-2.0
- Last commit
- Nov 2026
- Last release
- Nov 2026
- Language
- Rust
13,929 on 28 Apr 202614,273 on 17 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Diesel is a Rust crate that builds SQL queries through the type system, so malformed queries and column type mismatches fail at compile time. It supports PostgreSQL, MySQL, SQLite and MariaDB, selected by a Cargo feature. Derive macros map structs to rows and insert or update payloads, and a raw SQL API covers queries the builder cannot express. It is not an AI project.
Who it is for: Rust developers who want compile-time-checked database access
Strengths
- Query errors are caught at compile time through Rust's type system
- Derive macros (Queryable, Insertable, Selectable) remove manual row mapping
- Supports PostgreSQL, MySQL, SQLite and MariaDB behind Cargo features
- Raw SQL escape hatch via sql_query with bound parameters
Weaknesses
- Library only: no auth, storage or hosting, so it is not a full backend
- No AI or LLM features; it fits this list only loosely
- Rust only; the README shows no async API
- Heavy generic types can make compile errors hard to read
What it needs
- no GPU
- Compose
- Needs PostgreSQL, MySQL, MariaDB or SQLite
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe.
Known problems
Open now, reported in the last 90 days
Reported, then fixed by a linked change
- Diesel allows invalid SQL with subquery that uses ungrouped column from outer query ↗ (opens in a new tab)3 reactions · closed 2 Oct 2026Fixed by Reject subselects referencing ungrouped outer columns ↗ (opens in a new tab)
- diesel cli generate does not create relations for models in different schema when using postgres schema ↗ (opens in a new tab)1 reactions · closed 10 Jul 2026Fixed by Generate cross-schema relations in print schema ↗ (opens in a new tab)
- OrderDsl is not supported for aggregated statement even with group by. ↗ (opens in a new tab)1 reactions · closed 31 May 2026Fixed by Fix order_by/then_order_by with GROUP BY rejecting valid aggregate expressions ↗ (opens in a new tab)
- DatabaseError caused by foreign key `ON DELETE RESTRICT` is not classified as `ForeignKeyViolation` using Sqlite ↗ (opens in a new tab)1 reactions · closed 5 Jan 2026Fixed by fix(sqlite): classify ON DELETE RESTRICT violations as ForeignKeyViolation ↗ (opens in a new tab)
- Figure out why dependabot doesn't work ↗ (opens in a new tab)0 reactions · closed 22 Sept 2026Fixed by Fix Dependabot config and add a 7 day cooldown ↗ (opens in a new tab)
Titles are the reporters' own words, taken from the project's GitHub issues and ranked by reactions. We have not tried to reproduce any of them.
Also in Backends, databases and hosting
See all 275| Rank | Project | Score |
|---|---|---|
| 1 | bunJavaScript and TypeScript runtime with bundler, test runner and package manager | 94 out of 100 |
| 2 | coolifySelf-hosted Heroku and Vercel alternative that deploys apps and databases over SSH | 93 out of 100 |
| 3 | traefikHTTP reverse proxy and load balancer that auto-discovers routes from orchestrators | 93 out of 100 |
| #4 | appwriteBackend with auth, databases, storage, functions and an MCP server for agents | 93 out of 100 |
| #5 | medusaNode.js commerce platform with modular products, carts, orders and payments | 93 out of 100 |