@rustaceans

Tokio!

It's 'static + multithreaded-by-default requirement has created the myth that async #Rust is inherently difficult.

People should use `smol` more - here's why:

#Async Rust can be a pleasure to work with (without `Send + Sync + 'static`) - by Evan Schwartz:

https://emschwartz.me/async-rust-can-be-a-pleasure-to-work-with-without-send-sync-static/

https://floss.social/@janriemer/114681713674697800

#smol #RustLang #Asynchronous #AsyncRust

The Evolution of Async Rust: From Tokio to High-Level Applications | The RustRover Blog

Tokio has become the de facto asynchronous runtime for high-performance networking in Rust, powering everything from backend services to databases. During the discussion, they explored how async Rust matured over the years, the architectural decisions behind Tokio, common challenges developers face today, and where the ecosystem is heading next.

The JetBrains Blog
🚀✨ RustConf 2025: where we learn that "cancelling" async Rust is as easy as cancelling your gym membership—good luck with that! The article promises a thrilling ride through the labyrinth of #programming jargon, complete with links nobody asked for and slides only a mother could love. 🎢🗣️
https://sunshowers.io/posts/cancelling-async-rust/ #RustConf2025 #asyncRust #humor #techcommunity #HackerNews #ngated
Cancelling async Rust · sunshowers

Correctness in the face of cancellations: a written version of my talk at RustConf 2025.

Cancelling async Rust

Ok, @calisti, I _think_, I've figured it out now (please read until the later parts of the toots as they are the most important)!🤓

Tldr; The `or` or `race` operators _on their own_ are not suitable for cancelling streams! One needs a `StopToken` or enum value _within the stream_ that signals cancellation/allows for short-circuiting.

1/?

#Rust #RustLang #AsyncRust #Async

Hey #Rust,

how dare you look so elegant as a systems programming language! 💅

#Smol #AsyncRust #RustLang

Second: Pinning helpers!

When doing async #Rust, there will be a point, where you'll get the ominous "Doesn't implement Unpin" error and "You need to pin your value".

First, learn about Pinning:
https://doc.rust-lang.org/std/pin/

Like, _really_ learn and understand it:
https://fasterthanli.me/articles/pin-and-suffering

And then use smol's pin! macro and the `pin_project` crate:
https://docs.rs/pin-project/latest/pin_project/

I might continue this thread with more insights I gain during this little project - stay tuned! 🙂

4/4?

#RustLang #AsyncRust

std::pin - Rust

Types that pin data to a location in memory.

Async #Rust is actually awesome!  

The last few days I've built a prototype(!) of a global "Hotkey" system e.g.:

Press & Hold `LCtrl + Space`
=> an async stream starts and only finishes if:
- another key is pressed or
- one of the Hotkeys is released

If it is not clear by now: this is a state-machine, which fits _perfectly_ into Rust's #async model!

And the best part: This is actually _the first time_ I've ever touched async #RustLang! Such a pleasant experience!

1/?

#AsyncRust

Last chance to sign up for workshops at #rustconf25, Sept 2 in Seattle: Learn Async Design Patterns, Async Fundamentals, or Rust at the Edge from experts. Register before seats sell out! Some only have ONE seat remaining. https://ti.to/rustconf/2025?source=mastodon
#RustConf #AsyncRust #AI #rustlang

Small classes. Expert instructors. Practical skills you can use immediately. Join Async Day at #rustconf25, Sept 2 in Seattle: Async Design Patterns, Async Rust & C++, Async Fundamentals, and Rust at the Edge. Sign up! https://ti.to/rustconf/2025?source=mastodon

#rustlang #asyncrust #opensource

Rust STM32 GPIOs Tutorial - The Oasis BBS

Learn how to build a Rust STM32 GPIOs hardware tester in 60 lines using Embassy and probe-rs. Watch the full tutorial now.

The Oasis BBS