diesel
A safe, extensible ORM and Query Builder for Rust (by diesel-rs)
sqlx
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite. (by launchbadge)
Our great sponsors
diesel | sqlx | |
---|---|---|
82 | 144 | |
11,740 | 11,493 | |
2.1% | 4.1% | |
9.5 | 9.2 | |
6 days ago | 5 days ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
diesel
Posts with mentions or reviews of diesel.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-19.
-
Top 10 Rusty Repositories for you to start your Open Source Journey
7. Diesel
-
cargo-dist pre-release looking for feedback!
First of all thanks for making this great tool. As it happens I currently toy around with using it for diesel-cli releases. See the WIP PR here. I think diesel-cli is a good example of a tool that depends on system libraries as it needs to link native database drivers, so this new release is welcome. Defining the dependencies seems to allow easily building things on x86_64-unknown-linux-gnu and x86_64-apple-darwin. It seems to pick up everything in the right way there.
-
Rust & MySQL: connect, execute SQL statements and stored procs using crate sqlx.
I did look at mysql initially. Then I started checking other crates. Diesel is an Object Relation Model (ORM), I'm not yet keen on taking on the complication of learning ORM, I give this crate a pass in the meantime.
-
Queryx: An Open-Source Go ORM with Automatic Schema Management
I would recommend people look at diesel from Rust for how nice it could be. https://diesel.rs/ Look at the complex queries example. So much more readable and easier to understand.
-
/r/startrek/ migrates to lemmy
Lemmy is written in Rust using Actix Web and Diesel.rs.
-
Backend API recommendations
for psql i feel like there's a wealth of things to choose from, like diesel perhaps https://crates.io/crates/diesel
-
Diesel 2.1
Essentially you would need to implement Backend + Connection (+ the whole bunch of helper traits) for this type. That's ~1kloc for all of that. The PR that introduced this feature has more details on the exact implementation that's generated.
-
New Rustacean Looking For Guidance
diesel
-
What ORM do you use?
some things are barely expressible in the type system. For example, window functions are unavailable (the issue is six years old). You can use raw SQL, but then it has the same problems sqlx has
-
Trait object with generic funtion: don't understand how to do it
Have you considered using a library such as sqlx or Diesel? They’ll handle this for you and supports multiple backends
sqlx
Posts with mentions or reviews of sqlx.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-09.
-
Rust as a general application language
What exactly are you missing? I haven't really written "boring corporate backend stuff" in a few years but something like sqlx provides everything I've ever needed there.
-
Hey Rustaceans! Got a question? Ask here (49/2023)!
Badges are the little rectangles you typically see at the top of a crate's README: https://github.com/launchbadge/sqlx/blob/main/README.md
-
A new F# compiler feature: graph-based type-checking
SQLX has entered the chat [1].
-
Grimoire - A recipe management application.
Database : SqLite (using sqlx).
-
Introducing SQLPage : write websites entirely in SQL
I'm considering making my own wrapper over lower-level database drivers. There are a lot of features in sqlx that I don't need, and the latest version seems to have removed useful data structures that SQLPage is using. It also removed support for SQL Server.
sqlx to interface with multiple databases (I am considering moving to something else to support more databases, though)
-
SQLx 0.7 released! Offline mode usability improvements, performance fixes and major upgrades across the board!
The biggest thing to note in this release is the restructuring of the project and the removal of the MSSQL driver as it was not at the same maturity and usability level as the other drivers. As previously announced (https://github.com/launchbadge/sqlx/discussions/1616), we have plans to introduce a fully featured replacement as a premium offering, alongside drivers for other proprietary databases, with the goal to support full-time development on SQLx.
- Is ORM still an anti-pattern?
- PHP to Golang
What are some alternatives?
When comparing diesel and sqlx you can also consider the following projects:
sea-orm - 🐚 An async & dynamic ORM for Rust
rustorm - an orm for rust
rbatis - Rust Compile Time ORM robustness,async, pure Rust Dynamic SQL
tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
r2d2 - A generic connection pool for Rust
rusqlite-model - Model trait and derive implementation for rusqlite
prisma-client-rust - Type-safe database access for Rust
rust-postgres - Native PostgreSQL driver for the Rust programming language
deuterium-orm - Fully typed SQL query builder for Rust [deprecated]
tikv - Distributed transactional key-value database, originally created to complement TiDB