|6 days ago||19 days ago|
|MIT License||GNU General Public License v3.0 or later|
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.
Building My First Command Line Interface (CLI) with Rust
3 projects | dev.to | 25 Nov 2021
This is where the tokio library comes in to play. We add it to the Cargo.toml under [dependencies] .
"This paper examines this most frequently deployed of software architectures: the BIG BALL OF MUD. A BIG BALL OF MUD is a casually, even haphazardly, structured system. Its organization, if one can call it that, is dictated more by expediency than design. "
2 projects | reddit.com/r/programming | 19 Nov 2021
There's little like thing to catch (like the async mutex overhead https://github.com/tokio-rs/tokio/issues/2599 is this improved?) or like I was talking about in the other threads you get stuck into certain design decisions you end up making to make the borrow check happy, the api for the metrics crate. If globals were easier to use use, you wouldn't need an api that requires doing look ups in a hash map.
Async, refactoring and fewer bugs: Rust block expressions to the rescue
1 project | dev.to | 18 Nov 2021
Let's up the game and see a Tokio example.
How to use a non-blocking C library with async?
1 project | reddit.com/r/rust | 12 Nov 2021
All I know is that IOCP is quite different from the traditional Unix select/epoll/etc. model. Seems like there is an open issue for plugging arbitrary Windows handles to Tokio.
Announcing dlm: a minimal HTTP download manager
4 projects | reddit.com/r/rust | 5 Nov 2021
The downloads are performed using [reqwest](https://github.com/seanmonstar/reqwest) and [tokio](https://github.com/tokio-rs/tokio) in an asynchronous fashion.
That's my variable!
1 project | reddit.com/r/ProgrammerHumor | 30 Oct 2021
For example, Tokio (Rust) has a multi-threaded task scheduler: https://tokio.rs
Pointer Fu: An adventure in the Tokio code base
1 project | dev.to | 25 Oct 2021
In an effort to understand the internals of asynchronous runtimes, I've been spending time reading Tokio's source code. I've still got a long way to go but it has been a great journey so far.
Implementing the Health Check API Pattern with Rust
8 projects | dev.to | 24 Oct 2021
For sqlx, we want to make sure we include the "postgres" feature during compilation, so we have PostgreSQL drivers to connect to our PostgreSQL database with. Next, we'll want to make sure we have the runtime-actix-native-tls feature included so that sqlx can support the actix-web framework which uses the tokio runtime. Finally, let's include serde and serde_json for serializing our Health Check API response body for later in the post.
Hey Rustaceans! Got an easy question? Ask here (40/2021)!
14 projects | reddit.com/r/rust | 4 Oct 2021
You can use -Dwarnings to have any warning become a compiler error. See an example here.
Hey Rustaceans! Got an easy question? Ask here (38/2021)!
7 projects | reddit.com/r/rust | 21 Sep 2021
How about this one? Add Stream mock to tokio-test
Why asynchronous Rust doesn't work
3 projects | reddit.com/r/programming | 13 Nov 2021
Go's solution is for the scheduler to notice after a while when a goroutine has blocked execution and to shift goroutines waiting their turn to another thread. async-std pondered a similar approach with tasks, but it proved controversial and was never merged.
Building static Rust binaries for Linux
6 projects | dev.to | 17 Oct 2021
This indicates curl, zlib, openssl, and libnghttp2 as well as a bunch of WASM-related things are being dynamically linked into my executable. To resolve this, I looked at the build features exposed by surf and found that it selects the "curl_client" feature by default, which can be turned off and replaced with "h1-client-rustls" which uses an HTTP client backed by rustls and async-std and no dynamically linked libraries. Enabling this build feature removed all -sys dependencies from androidx-release-watcher, allowing me to build static executables of it.
Rust async is colored, and that’s not a big deal
4 projects | reddit.com/r/rust | 14 Mar 2021
And also, the actual PR never got merged.4 projects | reddit.com/r/rust | 14 Mar 2021
Many people believe that based on the blog post about it, but the PR was actually never merged, and the approach was abandoned due to various issues.
Rust's async isn't f#@king colored!
4 projects | reddit.com/r/rust | 10 Mar 2021
Async in rust needs a runtime (aka executor) to run. You can maybe get a better description from the rust docs. As an example, Tokio attempts to provide an interface for a developer that is minimal change to the more common blocking code. So you'd end up putting #[tokio::main] above your main function to spin up the executor and most of the rest of the code is similar to a non-async version with a few sprinkles of .await, which you can see in the hello world for tokio. In contrast, async-std provides a more hands-on/low-level approach. If you are unlucky enough to have libraries that choose different stacks to work on, you'll possibly (probably?) have to handle both.
Comparison of Rust async and Linux thread context switch time and memory use
7 projects | news.ycombinator.com | 11 Feb 2021
Nothing so fancy.
Each worker thread runs in a loop executing a queue of jobs. On every iteration it sets an atomic progress flag to true.
The runtime in which it's contained polls its workers every 1-10ms, atomically swapping in false and checking to see if the previous value was also false - if so, it steals its task queue and spins up another worker to execute it.
What is the best way to ask for user input while simultaneously outputting to the console?
2 projects | reddit.com/r/rust | 16 Jan 2021
async-std uses blocking I/O on a background thread. tokio does the same for its equivalent API.
async-std v1.9.0 has been released!
2 projects | reddit.com/r/rust | 15 Jan 2021
Looking at https://github.com/async-rs/async-std/pull/915/, it seems the deprecated APIs were hidden behind a feature flag called unstable which is understood to not guarantee such backwards compatibility.2 projects | reddit.com/r/rust | 15 Jan 2021
Tokio, the async runtime for Rust, hits 1.0
12 projects | news.ycombinator.com | 23 Dec 2020
if I understand correctly, smol was created by the async-std folks, and async-std now uses it as its runtime
What are some alternatives?
rayon - Rayon: A data parallelism library for Rust
Rocket - A web framework 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.
smol - A small and fast async runtime for Rust
hyper - An HTTP library for Rust
bevy - A refreshingly simple data-driven game engine built in Rust
warp - A super-easy, composable, web server framework for warp speeds.
reqwest - An easy and powerful Rust HTTP Client
actix-web - Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
winit - Window handling library in pure Rust
sled - the champagne of beta embedded databases
async-std-hyper - How to run Hyper on async-std