- cross-posted to:
- hackernews@lemmy.smeargle.fans
- cross-posted to:
- hackernews@lemmy.smeargle.fans
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.