3 ms·
At work, we have a non-async RTOS https://hubris.oxide.computer/ https://hubris.oxide.computer/ though it is a bit harder to use than "add a dependency in Cargo
by steveklabnik 3y ago
At work, we have a non-async RTOS https://hubris.oxide.computer/ https://hubris.oxide.computer/ though it is a bit harder to use than "add a dependency in Cargo.toml" like most projects.
The original designer of Hubris, Cliff, has his own async RTOS that he uses for personal projects. He recently has been writing some blog posts on this that may be of interest to you:
* http://cliffle.com/blog/async-inversion/ http://cliffle.com/blog/async-inversion/
* http://cliffle.com/blog/composed-concurrency-in-drivers/ http://cliffle.com/blog/composed-concurrency-in-drivers/
The former is a general introduction to async, and the second is about applying it to write an I2C driver.
There already are some general RTOSes for Rust, and they do tend to use async:
* https://rtic.rs/2/book/en/ https://rtic.rs/2/book/en/
* https://github.com/embassy-rs/embassy https://github.com/embassy-rs/embassy (this one is used in the article)
* https://tockos.org/ https://tockos.org/
- the__alchemist 3y agoCliff's articles are outstanding! Re Rtic: I'm using the V1 of it, which is non-Async; it seems to offer smarter locking than using critical sections + Mutex, since it's capable of interrupting a lower-priority task with a higher one, depending on which resources are locked.