Our great sponsors
(Ab)using technology for fun & profit. Code accompanying my blog https://kerkour.com
There are plenty: - diesel - famous example of what the Rust type system can get you beyond just "memory safety". My go-to choice for most projects. Having autocomplete for my database DSL is something I find it hard to go without. But it comes at a fairly high cost of confusing, generic-heavy code. - sqlx - also a very solid choice. You write SQL queries, which are optionally checked against a database instance at compile-time. A downside I've heard repeated a lot (by some fairly reputably figures) is that sqlx adds a fairly significant overhead to queries, and according to this issue is 7-70x slower than diesel. If the performance of your database is important to you, run some benchmarks and see if it's an issue - seaorm - a relatively new ORM, and I haven't used it much, but my initial impressions were that it was a little too "magic". Maybe it just reminded me too much of Spring Boot. I'm not sure. It's probably a totally fine library - postgres (or equivalent) - you can always just skip the ORM and use the database driver directly. Pretty nice for smaller projects, but totally viable for big projects too. Just a matter of personal preference
A safe, extensible ORM and Query Builder for Rust
It's not even a libpq issue, but an issue with a specific libpq distribution. You just need to use a not broken version of libpq or ask the vendor of that specific libpq version to fix their binary. See here for a in depth discussion. Calling diesel or libpq to be responsible for this is rather strange.
Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
CRUD example with Rocket, Toql and MySQL
To check, if it meets your use case see the todo example or guide.
The cited 7-70x factor is for sqlite, it's not that serve for other backends. I would guess for sqlite the overhead is partially caused by forcing an async interface on top of a internally sync API. See here for some numbers.
Rust Development: Creating a REST API with Actix Web for Beginners
1 project | reddit.com/r/rust | 11 Mar 2023
What's new in SeaORM 0.11.0
1 project | dev.to | 9 Feb 2023
Using tokio with async-std in the same project
1 project | reddit.com/r/learnrust | 25 Jan 2023
Need help with Diesel ORM
1 project | reddit.com/r/rust | 18 Jan 2023
Call for Contributors and Reviewers 📢
4 projects | dev.to | 3 Jan 2023