DEV Community

Explained: Futures in Rust for Web Development

Bastian Gruber on May 02, 2019

As I explained in one of my last articles, Futures are one part of an asynchrounous environment. We need Syntax, Type and a Runtime to be able to ...
Collapse
 
jeikabu profile image
jeikabu

Pretty good write up.

For me the biggest gotchas were:

  1. Pull (rather than push) model; without tokio::run() or something else "pumping" poll() nothing happens
  2. Understanding what's going on with futures 0.1/0.2/0.3 crates
  3. Dealing with Send and Sync
Collapse
 
victorhqc profile image
Victor Quiroz

Thanks for sharing this!

I come from a Node.js background and grasping the idea of async programming in Rust has been a roller coaster experience and I'm still trying to get my head around it :)