this post was submitted on 25 Mar 2024
48 points (98.0% liked)
Rust
5658 readers
56 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Finally some positivity around async Rust!
I write a lot of embedded C for a living, and can't wait for the ecosystem to get better so I can switch to Rust. Threading always starts simple. All I need is to spawn a thread and wait for a message on a queue. Then requirements change and I'm waiting on multiple messages from multiple other threads and suddenly I'm writing yet another state machine that async Rust would write for me.
I also wish I had "coloured" functions in my embedded code. Often times it's not even documented if a function blocks or not, and sometimes the behaviour changes depending on compile time configuration (blocking, or interrupt driven, or DMA, etc.).
Async Rust certainly has it's complexity too, but at least to my brain it would make a lot of my code much simpler.
I need to find some time to really dig into Embassy one of these days.
I'm looking at Embassy too for a Pico project and combining it with a nostd mqtt implementation. However I need to understand Futures and if/how they relate to the async paradigm.
Sounds fun! I assume you're read the Async Book?
I have not, but I will now thanks.