Async Rust Is A Bad Language

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

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. channel-drain

    Drain multiple channels in Rust

    It's great! But there's nothing about it that requires futures.

    It really annoys me that something like this isn't built-in: https://github.com/mrkline/channel-drain

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. lunatic

    Lunatic is an Erlang-inspired runtime for WebAssembly

    Curious too. I follow Lunatic [0] as a candidate for future use, and also wasmCloud [1].

    [0] https://lunatic.solutions/

    [1] https://wasmcloud.com

  4. wg-async

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

  5. Rustler

    Safe Rust bridge for creating Erlang NIF functions

    Elixir/Rust is the new Python/C++, and Rustler makes the communicating between the 2 languages super easy: https://github.com/rusterlium/rustler

  6. FrameworkBenchmarks

    Source for the TechEmpower Framework Benchmarks project

    https://www.techempower.com/benchmarks/#section=data-r21&tes...

    From https://news.ycombinator.com/item?id=37289579 :

    > I haven't checked, but by the end of the day, I doubt eBPF is much slower than select() on a pipe()?

    Channels have a per-platform implementation.

    - "Patterns of Distributed Systems (2022)" (2023) https://news.ycombinator.com/item?id=36504073

  7. go

    The Go programming language

    https://github.com/golang/go/issues/10958 which I think was somewhat addresses a couple releases back.

  8. tracing-mutex

    A Mutex wrapper tracking acquisition order

    There's tracing-mutex that builds a dag of your locks when you acquire them and panics (at runtime) if it could deadlock: https://github.com/bertptrs/tracing-mutex

    parking_lot has a deadlock detection feature for when you deadlock that iirc tells you what deadlocked (so you're not trying to figure it out with a debugger and a lot of time) https://amanieu.github.io/parking_lot/parking_lot/deadlock/i...

    I also just found out about https://github.com/BurtonQin/lockbud which seems to detect deadlocks and a few other issues statically? (seems to require compiling your crate with the same version of rust as lockbud uses, which from the docs is an old 1.63 nightly build?)

  9. lockbud

    Statically detect memory, concurrency bugs and possible panic locations for Rust.

    There's tracing-mutex that builds a dag of your locks when you acquire them and panics (at runtime) if it could deadlock: https://github.com/bertptrs/tracing-mutex

    parking_lot has a deadlock detection feature for when you deadlock that iirc tells you what deadlocked (so you're not trying to figure it out with a debugger and a lot of time) https://amanieu.github.io/parking_lot/parking_lot/deadlock/i...

    I also just found out about https://github.com/BurtonQin/lockbud which seems to detect deadlocks and a few other issues statically? (seems to require compiling your crate with the same version of rust as lockbud uses, which from the docs is an old 1.63 nightly build?)

  10. rust

    Empowering everyone to build reliable and efficient software.

    See for example https://github.com/rust-lang/rust/issues/63818 and https://github.com/rust-lang/rfcs/pull/3467

    Basically the problem is that async blocks/fns/generators need to create a struct that holds all the local variables within them at any suspension/await/yield point. But local variables can contain references to other local variables, so there are parts of this struct that reference other parts of this struct. This creates two problems:

    - once you create such self-references you can no longer move this struct. But moving a struct is safe, so you need some unsafe code that "promises" you this won't happen. `Pin` is a witness of such promise.

    - in the memory model having an `&mut` reference to this struct means that it is the only way to access it. But this is no longer true for self referential structs, since there are other ways to access its contents, namely the fields corresponding to those local variables that reference other local variables. This is the problem that's still open.

  11. rfcs

    RFCs for changes to Rust

    See for example https://github.com/rust-lang/rust/issues/63818 and https://github.com/rust-lang/rfcs/pull/3467

    Basically the problem is that async blocks/fns/generators need to create a struct that holds all the local variables within them at any suspension/await/yield point. But local variables can contain references to other local variables, so there are parts of this struct that reference other parts of this struct. This creates two problems:

    - once you create such self-references you can no longer move this struct. But moving a struct is safe, so you need some unsafe code that "promises" you this won't happen. `Pin` is a witness of such promise.

    - in the memory model having an `&mut` reference to this struct means that it is the only way to access it. But this is no longer true for self referential structs, since there are other ways to access its contents, namely the fields corresponding to those local variables that reference other local variables. This is the problem that's still open.

  12. may

    rust stackful coroutine library

    Can you admit that you failed in making it a pleasant experience to write async, especially for library authors? I don’t think it’s too late to admit failure and implement something like May https://github.com/Xudong-Huang/may

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

  • Why Async Rust?

    3 projects | news.ycombinator.com | 15 Oct 2023
  • Elixir and Rust is a good mix

    10 projects | news.ycombinator.com | 13 Apr 2023
  • When Rust Hurts

    6 projects | news.ycombinator.com | 15 Feb 2023
  • backon: Maybe the most elegant retry library ever

    3 projects | /r/rust | 7 Feb 2023
  • Why we built a Rust-powered desktop app for previewing documentation

    2 projects | dev.to | 2 Feb 2023

Did you know that Rust is
the 5th most popular programming language
based on number of references?