4 ms·
Tokio is awesome and I end up using it on almost all of my server projects. But, particularly for library developers, one reason not to just jump on tokio and
by dgacmu 3y ago
Tokio is awesome and I end up using it on almost all of my server projects.
But, particularly for library developers, one reason not to just jump on tokio and instead strive for (some, reasonable) compatibility across executors is the embedded world - async is an amazing match for programming tiny microprocessors because it provides an elegant syntactic sugar for all of those little interacting state machines, you would otherwise write, but you don't want a heavyweight thread-based executor to be mandatory.
(The embassy embedded framework for rust is an example of this. It doesn't yet have as wide support as some non-async frameworks but for the things that it's compatible with, it's an absolute delight.)
- zbentley 3y ago> heavyweight thread-based executor While it's not the default, Tokio is usable in full without threads using the current-thread executor: https://docs.rs/tokio/latest/tokio/runtime/index.html#current-thread-scheduler https://docs.rs/tokio/latest/tokio/runtime/index.html#curren...