Search for a command to run...
Safe, extensible ORM and query builder for Rust with composable abstractions over SQL. Enables type-safe database interactions checked at compile time rather than runtime, so common mistakes like wrong column types or invalid queries are caught before execution.
Backed by NLNet, NGI Zero Core, Prototype Fund, and the GitHub Secure Open Source Fund, Diesel has undergone security reviews, including a 2025 penetration test by RadicallyOpenSecurity. Unlike Active Record–style ORMs, Diesel is designed to be abstracted over: you write reusable code in terms of your domain, not raw SQL. Zero-cost abstractions allow queries to run with minimal overhead.
Key features:
Common choices include backend services, REST and GraphQL APIs, CLI tools, and web applications built in Rust. Integrates with async runtimes like tokio for non-blocking database access.