Meet Osaka, a Rust async for explicit, well-defined code that doesn’t take up too much space
Having trouble fitting Tokio into constrained devices? For developers who want to use aysnc applications in Rust, Osaka is here to make embedded apps simpler than ever. Save space and time with this explicit, well-defined approach to Rust!
Rust is a great programming language if you’re looking for something without a lot of runtime dependencies and a well-developed ecosystem. However, for developers looking to write embedded async applications on constrained devices, the preexisting Tokio sometimes isn’t the best choice. That’s where Osaka comes into play.
Osaka is designed for continuations, not combinators. It gives developers a more readable flow while maintaining a smaller footprint. Inspired by Go and the Clay programming languages, Osaka is an attempt to make async more simplistic.
Asynchronous coding makes it possible for applications to wait for resources. While some developers might use threads, they do take a fair amount of space with their executable stack.
Embedded devices are generally small and they spend an awful lot of time hanging around and waiting for network packets. Async is the ideal solution, since they are much more lightweight than threads and they can wait until the CPU resources appear.
To be fair Rust already has an async option: Tokio. While Tokio does provided a solid platform for fast and reliable network apps, there is room for improvement for embedded devices.
Things are easy to understand in Osaka. All behavior is well defined and there are no implicit dependencies. Everything is explicit, from the code, the behavior, and even the errors! Basically, Osaka was designed to make things more unambiguous to the developer. Sometimes the simpler approach is the easiest!
Probably the most impressive thing about Osaka (aside from the castle) is that it can drastically reduce the binary size and memory usage. Get rid of racing bugs and dangling resources, simplify your code, and fit your async apps on embedded devices.