Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Another reason why async Rust is great: https://rtic.rs/

"The hardware accelerated Rust RTOS" -- it can use your interrupt controller as a scheduler.



I'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.


It'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.


So can Embassy -- look at InterruptExecutor.


It can, but adds some caveats that rtic does not have like dead locking.


>it can use your interrupt controller as a scheduler

Isnt' that how schedulers always work?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: