← Back to context

Comment by mrdataesq

1 day ago

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.