Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dirbaio
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
dirbaio
9mo ago
(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 compiler-generated async
2.
▲
by
dirbaio
3y ago
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,
3.
▲
by
dirbaio
3y ago
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 structs with fixe
4.
▲
by
dirbaio
3y ago
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 different tools for di
5.
▲
by
dirbaio
3y ago
> 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 to be a mess du