First, the async runtime:

My advice: If you're new to async Rust, start with a single-threaded-by-default runtime like smol:
https://docs.rs/smol/latest/smol/

Tokio's multi-threading by default and its frequent recommendation (especially to newcomers) is, IMHO, one of the biggest mistakes the Rust community has made!

Smol has everything you commonly need:
- channel
- Stream adapters
- etc.

3/?

Second: Pinning helpers!

When doing async #Rust, there will be a point, where you'll get the ominous "Doesn't implement Unpin" error and "You need to pin your value".

First, learn about Pinning:
https://doc.rust-lang.org/std/pin/

Like, really learn and understand it:
https://fasterthanli.me/articles/pin-and-suffering

And then use smol's pin! macro and the pin_project crate:
https://docs.rs/pin-project/latest/pin_project/

I might continue this thread with more insights I gain during this little project - stay tuned! 🙂

4/4?

#RustLang#AsyncRust