But if you have many long running tasks that only need to keep a handful of bytes of state when they're waiting, a mechanism like rust async can allow for huge memory savings while mostly retaining the same code style as stackful tasks.
And you can even use both approaches in the same program, with isolated stacks for realtime critical tasks and cooperative state machines for everything else.
This is why watchdog timers exist. Async does not shut off watchdog. Not sure what your point is.
I have no desire to use embedded rust async, I use C++ with none of the allocating containers, and honestly it’s more of a C with classes style than modern C++, plus FreeRTOS in my production embedded code. I would happily trade out C++ for the memory safety of rust.
I would pick up a lightweight RTOS written in non-async rust if one existed and I could have faith in it, but other than personal projects I can’t advocate for building a hardware project on something like this yet.
My point is that async doesn't introduce stalls unless you have a bug - a bug that could introduce a stall anyway. I don't see how async changes that.
I write firmware and operating systems for a living, by the way.
If I understand the article correctly, it seems that in this case the multitasking also isn't controlled by calling yield in custom user code, but rather always from the implementation that makes async/await work.
Faults are a way of life in software, they are unavoidable because each and every piece of software rests on a bunch of assumptions and if any one of those or a combination of them do not hold then you have a fault. Failure to envision that fault and a way to deal with it in embedded systems can cause damage to property, injury and loss of life.
None of this is simple, not in theory and definitely not in practice.
Yeah I would love to spot that my car’s LED task is faulty while trying to brake on a 100mph highway.
Because cooperative multitasking is bog-standard in OS kernels.