crossbeam
tokio
Our great sponsors
crossbeam | tokio | |
---|---|---|
33 | 147 | |
5,755 | 18,929 | |
3.2% | 2.8% | |
8.9 | 9.2 | |
8 days ago | 10 days ago | |
Rust | Rust | |
Apache License 2.0 | MIT License |
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
tokio
-
Introducing the Music Player: A High-Performance, Extensible Application for Digital Audio Playback
Finally, the networking and asynchronous code use tokio library, a Rust library for building fast and reliable networking applications. This allows the Music Player to handle multiple requests and connections concurrently, which is important for building a responsive and high-performance application.
-
Rust in the real world: Super fast data ingestion using ScyllaDB
Writing highly asynchronous concurrent applications using Tokio.
-
RFC: A non-blocking networking library for Rust
Rust already has a "high performance netty alternative (utilizing epoll and non blocking IO)" in tokio, no? How would this be different?
-
Release 19 of Rust based MQTT broker and client - Performance testing, public infra, and persistence
We haven't looked into WASM yet. But we depend on tokio and looks like tokio is still working on stabilizing WASM support
-
An Open Source Rust SNMP Simulator
Actix is an actor framework for developing concurrent applications built on top of the Tokio asynchronous runtime. It allows multiple actors to run on a single thread, but also allows actors to run on multiple threads via Arbiters. Actors can communicate with each other by sequentially exchanging typed messages.
-
How do you name your crates?
Also, if you type “tokio” into DuckDuckGo the first hit is https://tokio.rs/
-
State of Rust for web backends
I started using axum earlier this year, it's a relatively young project, but builds on the shoulders of more established giants like tokio, hyper and tower, both enabling use of a wider ecosystem of utilities for your services (tower and tower-http provide already pretty common services/layers you might need).
-
How to learn Rust (for backend) ?
Start with the Rust Book then maybe with the Aync Book (Not finished yet, but still a good learning experience) to learn about async programming which it's quite important for backend and then I would go on with Tokio which is widely use for async programming in Rust.
-
Rusty Ownership and the Lifecycle’s Stone
Well, the blog examples are quite trivial.
Take a look at the standard hashmap implementation (https://doc.rust-lang.org/src/std/collections/hash/map.rs.ht...). Notice the lifetime annotations everywhere. This is a relatively basic data structure, but it has a ton of visual noise due to the constraints of the lifetime and borrow model, and programmers must know, understand and be able to reason about these constraints when using this data structure.
Now imagine a case where you need to operate on values with two (or more) different lifetimes (by definition, all must live at least as long as the one with smallest lifetime, but in practice they all can and will have different lifetimes). Now you have `'a` and `'b` (and perhaps more) everywhere *and* developers must now reason about that. (random example pulled from a popular networking crate: https://github.com/tokio-rs/tokio/blob/718d6ce8cac9f2e081c0a...)
It isn't trivial to pick up from scratch, especially if one comes from a much higher level language (C#, Java, python, etc.). This is true even for people who are very experienced writing high-quality, durable, and safe code in other languages (e.g., C++) without the help of a compiler, because the ownership and lifetime model are both different and compiler-enforced.
-
Implement grpc client in rust language for openresty/Nginx
tonic is my favourite rust library. It's based on hyper and tokio. Everything works in async/await way.
What are some alternatives?
async-std - Async version of the Rust standard library
rayon - Rayon: A data parallelism library for Rust
Rocket - A web framework for Rust.
hyper - An HTTP library for Rust
actix-web - Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
futures-rs - Zero-cost asynchronous programming in Rust
smol - A small and fast async runtime for Rust
sqlx - 🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.
MIO - Metal IO library for Rust
glommio - Glommio is a thread-per-core crate that makes writing highly parallel asynchronous applications in a thread-per-core architecture easier for rustaceans.
bevy - A refreshingly simple data-driven game engine built in Rust