3 ms·
Another reason why async Rust is great: https://rtic.rs/ https://rtic.rs/ "The hardware accelerated Rust RTOS" -- it can use your interrupt controller as a sch
by mrdataesq 9mo ago
Another reason why async Rust is great: https://rtic.rs/ https://rtic.rs/
"The hardware accelerated Rust RTOS" -- it can use your interrupt controller as a scheduler.
- the__alchemist 9mo agoI've used RTIC in a few cases. In practice, it's a thin wrapper over interrupt handlers and locks on resources in them. These days, I prefer using macros to simplify the (natively onerous: many <> brackets with Mutex, RefCell etc.!) locking and initialization of global variables. It also has software tasks, which is presumably the Embassy tie-in you mention.
- mrdataesq 9mo agoIt's very small and focused, but it fits in places Embassy can't. It reminds me in some ways of coroutines, but it can preempt. The data-sharing maybe could be nicer, but I do think it's an improvement over C -- you get the ability to do things that you might otherwise need something much bigger like Zephyr for.
- wrs 9mo agoSo can Embassy -- look at InterruptExecutor.
- bfrog 9mo agoIt can, but adds some caveats that rtic does not have like dead locking.
- 5d41402abc4b 9mo ago>it can use your interrupt controller as a scheduler Isnt' that how schedulers always work?