Learning async: a simple progress bar

Hi! Async await is intended for IO-bounded code, which is why futures sometimes cannot make progress: It's waiting for some IO operation to complete. If you want to do CPU-bound code, you should probably be looking more in the direction of the rayon crate, which is intended for that.

As for avoiding Tokio and async-std, well that isn't going to make your code simpler. You need to choose an executor to run your futures — Rust doesn't come with one like you may be used to from other languages. You may want to read this thread that gives some intuition of how futures work and the surrounding ecosystem, and perhaps also this blog post that goes more in-depth on how futures work and what cooperative scheduling is.

4 Likes