crossbeam
sqlx
Our great sponsors
crossbeam | sqlx | |
---|---|---|
33 | 107 | |
5,782 | 7,795 | |
3.7% | 5.7% | |
8.9 | 9.2 | |
6 days ago | 2 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.
crossbeam
- This implementation is actually unsafe since we don't check if the index is in-bounds. But this is fine since this is only used internally.
-
Rust vs Go
Deadlocks and leaks are easy as other languages.
- Help with package licensing issues
-
Kanal: Channels 80x faster than the standard library!
Ouch, didn’t know about https://github.com/crossbeam-rs/crossbeam/issues/821, thanks for pointing that out, that’s a big update for me!
-
Hey Rustaceans! Got a question? Ask here! (21/2022)!
The last option I can think of is using two threads (like above) and epoch GC instead of a lock (i.e. using crossbeam-epoch). But I don't have enough experience with this to say anything about it.
-
what are the resources for writing multi threaded programs in rust
You should definitely look at the Rayon crate. After I figured that out, my productivity vs multi threaded C was exponentially better (literally did many days of equivalent C work in less than an hour). Rayon is focused on data processing, other multi threaded stuff can benefit from other crates like crossbeam (Channels, scoped threads), and tokio (async networking).
- Audio Libraries Considered Challenging
-
Hacker News top posts: Apr 17, 2022
Crossbeam – Tools for concurrent programming in Rust\ (14 comments)
- crossbeam - Tools for concurrent programming in Rust
- Crossbeam – Tools for concurrent programming in Rust
sqlx
- Rust's Witchcraft
-
You might not need an ORM
There's an offline feature that
> Enables building the macros in offline mode when a live database is not available (such as CI) [0]
[0] https://github.com/launchbadge/sqlx/blob/76ae2865005cc79d569...
-
What is the status of sqlx?
Thanks didn't know about this! Sent a PR to add this as a notice to the README.
-
Objection to ORM Hatred
ORM's come and go just like web frameworks, so I really don't care for them. I use sqlx [1] when I can.
-
Architecture Pitfalls: Don’t use your ORM entities for everything — embrace the SQL!
Nowadays, I'm playing around with Rust using sqlx, and when I write the direct SQL for most queries I get compile time checks that it's valid SQL (to a degree). I'm also leaning more heavily into the database, so I'm also writing stored procedures for certain activities, which means in the application code I just need SQL that calls one function in those instances.
The sqlx library is what I hope to see the next generation of ORMs to look like though technically it's anti-ORM in a lot of ways. Embracing the features of an advanced object relational database like PostgreSQL directly is a major productivity and expressiveness boost but yes, manually mapping your rows to your DTOs and working with raw strings is major source of bugs. sqlx virtually solves this by:
-
Looking for SeaORM (+ Axum, if possible) examples?
Not exactly what you're looking for, but hopefully you can find something out of this. I'm using SQLx to talk to Postgres, handle all of the migration logistics, and pool my db connections; I'm also sea_query to compose my sql queries, which seaORM is built on top of.
-
Hey Rustaceans! Got a question? Ask here (52/2022)!
Datetime types are not supported in the MSSQL driver currently. We intend to fix that when transitioning it to SQLx Pro: https://github.com/launchbadge/sqlx/discussions/1616
-
I switch from Golang and want to build a REST API in Rust.
sqlx for the database: https://github.com/launchbadge/sqlx
What are some alternatives?
diesel - A safe, extensible ORM and Query Builder for Rust
rayon - Rayon: A data parallelism library for Rust
tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
sea-orm - 🐚 An async & dynamic ORM for Rust
rust-postgres - Native PostgreSQL driver for the Rust programming language
actix-web - Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
sled - the champagne of beta embedded databases
rust-threadpool - A very simple thread pool for parallel task execution
rbatis - Rust Compile Time ORM and SQL Toolkit. async, pure Rust compile-time Dynamic SQL
rust-rest
Rocket - A web framework for Rust.