What does HackerNews think of embassy?
Modern embedded framework, using Rust and async.
The original designer of Hubris, Cliff, has his own async RTOS that he uses for personal projects. He recently has been writing some blog posts on this that may be of interest to you:
* http://cliffle.com/blog/async-inversion/
* http://cliffle.com/blog/composed-concurrency-in-drivers/
The former is a general introduction to async, and the second is about applying it to write an I2C driver.
There already are some general RTOSes for Rust, and they do tend to use async:
* https://github.com/embassy-rs/embassy (this one is used in the article)
Ah yes, I won't disagree here; macros get very complex very fast. It's one of the more undercooked parts of Rust.
> e.g. I don't really see the usefulness of async-await in a systems programming language
This really depends on the task, but honestly it is genuinely useful. Even in places you wouldn't expect, e.g. in embedded: https://github.com/embassy-rs/embassy
And AFAIK there are plans to use async Rust in the Linux kernel.
There's also the Linux testing project, which is technically third party. It's not clear to me how extensive it is but for a project as important as Linux I think it has to be graded as "needs improvement."
The other part is the stm32-metapac (not specific to async) that generates the PAC for any stm32 chip.
Read more about embassy here: https://github.com/embassy-rs/embassy
https://github.com/embassy-rs/embassy https://github.com/embassy-rs/nrf-softdevice
Together with https://github.com/nrf-rs/nrf-hal these enable most everything one can do on these controllers form pure Rust (the softdevice is a blob with a C-SDK that's wrapped in rust though)
I'm very excited about this for one simple stupid reason: sleep(). Awaiting a timer delay deep inside some code is gonna be amazing. With typical sync code, you basically have to split your code and queue up the next work somewhere that would be picked up by the timer interrupt… basically doing the whole state-keeping that async would do for you.