rocket_auth
sqlx
Our great sponsors
rocket_auth | sqlx | |
---|---|---|
2 | 124 | |
65 | 8,322 | |
- | 6.3% | |
6.7 | 9.0 | |
5 months ago | 6 days ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
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.
rocket_auth
-
Authentication for Rocket+Diesel application
The basic CRUD operations are done, however I'm still missing the users and authentication logic. Since I don't want to build it form scratch if possible, I found rocket_auth which seems perfect, except that it does not support diesel.
-
Hey Rustaceans! Got an easy question? Ask here (14/2021)!
There is https://github.com/tvallotton/rocket_auth, which salts by default IIRC
sqlx
-
What are the advantages of using Rust to develop KV databases?
Perhaps Rust has some nice crates that will assist your development, but you're going to have to evaluate whether their design decisions meet the needs of your design, especially if you want to handle powerloss without data loss whilst maintaining high performance. Here's an example of where a create chose design over performance https://github.com/launchbadge/sqlx/issues/2007
-
Why use Rust on the backend? by Adam Chalmers
SQLx's query macros act like format macros, and the database is apparently smart enough to not treat bind parameters as part of the SQL.
-
Why use Rust on the back end?
> Doesn't it need to run introspection queries to check the table structures?
Yes, but it can also run in 'offline' mode where it builds against saved metadata [0]
0: https://github.com/launchbadge/sqlx/blob/main/sqlx-cli/READM...
-
Arbitrary code execution during compile time - rust
well it does have its usecases. e.g. https://github.com/launchbadge/sqlx
-
Things I learned after getting users
I felt the same way until I found sqlx (https://github.com/launchbadge/sqlx). The package lets you write sql in your app with compile-time checks. Was so much easier to get up and running than learning a new ORM.
If writing SQL directly, what process do you use to update your queries during schema changes? Do you rely on a test suite to catch errors then update queries by hand? Are you using compile-time checks through libraries like sqlx [1]?
-
Improving sqlx-related Compile Times
You probably know about this already but we've finally landed the change to one file per query in offline mode which should provide both performance and ergonomic improvements, especially when it comes to merging multiple Git branches that change queries.
-
Programming block?
What I really like about it (apart from being a really nicely designed language, that is very expressive, powerful, performant and one of the safest because of the strict typing/memory management), is that you can kind of focus on just programming, without all the hassles around setting up a project, thinking about building/deploying etc. as tooling is really awesome as well (rust-analyzer, cargo, crates.io etc.). Libraries are usually high-quality and innovative (which is IMHO not so true for a lot of different other languages, including the ones you mentioned). E.g. if you want to create a web-server/API you could try something like this (my current recommendation): https://github.com/tokio-rs/axum and https://github.com/launchbadge/sqlx for good integration of typed sql in Rust or if you want something higher level: https://github.com/SeaQL/sea-orm
-
Install a CLI in a project (not globally)
It doesn't allow you to install third-party binaries, but it allows you to make your own binaries runnable with something similar to npx. And, as sqlx-cli is also available as a library, you can make an xtask which just runs that.
What are some alternatives?
diesel - A safe, extensible ORM and Query Builder for Rust
sea-orm - 🐚 An async & dynamic ORM for Rust
tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
rust-postgres - Native PostgreSQL driver for the Rust programming language
rbatis - Rust Compile Time ORM robustness,async, pure Rust Dynamic SQL
actix-web - Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
sled - the champagne of beta embedded databases
rust-rest
Rocket - A web framework for Rust.
axum-rest-starter-example - Quick demo of a REST frontend with a Redis session store.
Squirrel - Fluent SQL generation for golang
rayon - Rayon: A data parallelism library for Rust