The bane of my existence: Supporting both async and sync code in Rust
IntroductionImagine you want to create a new library in Rust. All it does is wrap up a
public API that you need for something else, like
the Spotify API or maybe a
database like ArangoDB. It’s not rocket science, you
aren’t inventing something new or dealing with complex algorithms, so you expect
it to be relatively straightforward.You decide to implement the library with async. Most of the work in your library
has to do with performing HTTP requests, which are mostly I/O, so it makes sense
(tha...
Read more at nullderef.com