Async Rust: What is a runtime? Here is how tokio works under the hood

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • reqwest

    An easy and powerful Rust HTTP Client

  • > The big HTTP libraries let you opt out (of async)

    At least for reqwest it just wraps the async code in something like `block_on`: https://github.com/seanmonstar/reqwest/blob/5397d2cf8eaecc9f...

    And as the sibling comment says, you can do that in your own code. It does still add Tokio to your binary size, and probably start a bunch of worker threads you don't need, but it does work.

  • wg-async

    Working group dedicated to improving the foundations of Async I/O in Rust

  • This is a consequence of runtimes relying on global variables that their core future types are dependent on. Creating abstractions to solve this problem is one of the main goals of the the async working group [0].

    [0]: https://github.com/rust-lang/wg-async

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • smol

    A small and fast async runtime for Rust

  • preemptible-thread

    How to preempt threads in user space

  • There's waiters and polling that only executed your function to progress and there's pending and done. Any help to understand the relationship between the three things would be appreciated.

    I wrote a M:N thread scheduler in C, Java and Rust. The C version also can schedule file reading to an IO thread but I'm nowhere near finished.

    https://github.com/samsquire/preemptible-thread

    Another of my ideas is to rewrite synchronous code into parallel LMAX disruptors. In other words a tree of RingBuffer each line of synchronius code its own event loop. Rather than one event loop multiplexing events from different systems you pipeline every blocking call. I think it would be very fast.

    Here's a write-up.

    https://github.com/samsquire/ideas4#51-rewrite-synchronous-c...

  • ideas4

    An Additional 100 Ideas for Computing https://samsquire.github.io/ideas4/

  • There's waiters and polling that only executed your function to progress and there's pending and done. Any help to understand the relationship between the three things would be appreciated.

    I wrote a M:N thread scheduler in C, Java and Rust. The C version also can schedule file reading to an IO thread but I'm nowhere near finished.

    https://github.com/samsquire/preemptible-thread

    Another of my ideas is to rewrite synchronous code into parallel LMAX disruptors. In other words a tree of RingBuffer each line of synchronius code its own event loop. Rather than one event loop multiplexing events from different systems you pipeline every blocking call. I think it would be very fast.

    Here's a write-up.

    https://github.com/samsquire/ideas4#51-rewrite-synchronous-c...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts