(Embassy dev here) You can get preemptive scheduling of async tasks with InterruptExecutor. You create one executor for each priority level, then spawn the tasks in the right one. The latency of the executor and the…
Async Rust does definitely work for non-toy use cases. As a data point, we use Embassy for all production firmware at my startup (https://akiles.app/en), using async tasks for everything: Bluetooth, TCP/IP networking,…
Rust async is a bit different than in other languages. It's more like sugar over state machines instead of sugar over callbacks. This is what makes it work nicely on embedded. The compiler-generated state machines are…
You can use futures combinators like `join`, `select`, `with_timeout` with async Rust. (crates like `embassy-futures` or `futures` have implementations of these). They work nicely even in no-std embedded. They're…
> It appears unsuitable for use with DMA, which I use for all runtime IO The `embedded-hal-async` traits can be implemented with DMA, the Embassy HALs do so. This is a problem with the `nb` traits only. > The APIs tend…
(Embassy dev here) You can get preemptive scheduling of async tasks with InterruptExecutor. You create one executor for each priority level, then spawn the tasks in the right one. The latency of the executor and the…
Async Rust does definitely work for non-toy use cases. As a data point, we use Embassy for all production firmware at my startup (https://akiles.app/en), using async tasks for everything: Bluetooth, TCP/IP networking,…
Rust async is a bit different than in other languages. It's more like sugar over state machines instead of sugar over callbacks. This is what makes it work nicely on embedded. The compiler-generated state machines are…
You can use futures combinators like `join`, `select`, `with_timeout` with async Rust. (crates like `embassy-futures` or `futures` have implementations of these). They work nicely even in no-std embedded. They're…
> It appears unsuitable for use with DMA, which I use for all runtime IO The `embedded-hal-async` traits can be implemented with DMA, the Embassy HALs do so. This is a problem with the `nb` traits only. > The APIs tend…