smol
async-std-hyper
smol | async-std-hyper | |
---|---|---|
9 | 1 | |
3,414 | 40 | |
1.7% | - | |
6.8 | 0.0 | |
14 days ago | over 1 year 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.
smol
-
The State of Async Rust
My understanding is you always need a runtime, somethings needs to drive the async flow. But there are others on the market, just not without the.. market domination... of tokio.
https://github.com/smol-rs/smol looks promising simply for being minimal
https://github.com/bytedance/monoio looks potentially easier to work with than tokio
https://github.com/DataDog/glommio is built around linux io_uring and seems somewhat promising for performance reasons.
I haven't played with any of these yet, because Tokio is unfortunately the path of least resistance. And a bit viral in how it's infected tings.
- Smol: A small and fast async runtime for Rust
-
Tokio for FFI app?
There is also https://github.com/smol-rs/smol which has components which you can compose into your own executor if you still need async IO but your usage patterns don't fit into the general purpose ones that Tokio provides.
-
Tokio application structure, critical code flow.
If you need precise control over scheduling, consider building something on top of https://github.com/smol-rs/smol
- Async Rust: What is a runtime? Here is how tokio works under the hood
-
18 factors powering the Rust revolution, Part 2 of 3
Tokio is a "take what you need" framework, whilst Async-std started as an "everything the box" solution. Today both have a lot of crossover with micro async runtimes like smol becoming the foundation one of framework and optionally usable in the other. The ability to rip out a small dependent sub-crate (dependent package) like smol and use it independently with ease never get's boring, by the way. It's great way to include a test runtime in an async library without forcing the inclusion of a giant async framework.
-
[Question] Is Tokio a poor fit for non-network related concurrent applications?
Helix uses tokio. smol might be a good alternative however.
-
Async feedback from 2 years of usage
No, still active on GitHub. What gave you that idea? https://github.com/smol-rs/smol
-
Tokio, the async runtime for Rust, hits 1.0
Found the issue in Google cache. I'm not sure it's really fair of me to post this link here, but equally I think it's better to give the actual text rather than leave it vague.
https://webcache.googleusercontent.com/search?q=cache:PRjMyv...
async-std-hyper
-
Tokio, the async runtime for Rust, hits 1.0
Here is an example: https://github.com/async-rs/async-std-hyper/blob/master/READ...
You do have to write a ~50 loc compat layer. However, most of the compat layer is due to the fact that tokio's `AsyncRead` and `AsyncWrite` are different from the standard futures crate, which may change in the future [0]. After that, you just have to implement `hyper::Executor` for async-std's `spawn`, and `hyper::Accept` for async-std's `TcpListener`.
Of course, it is not as generic as `Future`, but it is relatively simple. As @steveklabnik mentioned:
> There's a few points here that still need some interop work. The intention is to fix that, but it's non-trivial. We'll get there.
[0]: https://github.com/tokio-rs/tokio/issues/2716
What are some alternatives?
tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
reqwest - An easy and powerful Rust HTTP Client
async-std - Async version of the Rust standard library
bastion - Highly-available Distributed Fault-tolerant Runtime
warp - A super-easy, composable, web server framework for warp speeds.
ureq - A simple, safe HTTP client
Warp - Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
rio - pure rust io_uring library, built on libc, thread & async friendly, misuse resistant
stylus - Lightweight status page for home infrastructure