
Rust's Journey to Async/Await
About this video
Steve Klabnik walks through the history of Rust and how its design evolved toward async/await, including the alternatives tried and dropped. He also discusses the difficulty of adding a major feature to a language.
Why it appears in the archive
HN points to it to show how deliberately the Rust team arrived at async/await and why it was chosen over alternatives like green threads.
AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.
From the Hacker News discussion
Oh boy. The author of this post gave a speech about Rust’s journey to async/await: [VIDEO] I highly recommend you skim it. It will show you how meticulous the core team is and how long it took to arrive at this incredible, best in class design.
Read original comment ↗I was referring to the fact that it is the only async implementation that I know of that compiles to a state machine that doesn't need to allocate new memory for each continuation. I think it will translate to extremely fast web services in practice. Pinning is of course part of the elegant solution. There are some great videos about it: [VIDEO] [LINK]
Read original comment ↗I believe these are the talks from Steve that he's referring to. It was enlightening for me: 1. Rust's Journey to Async/Await - [VIDEO] 2. The Talk You've been Await-ing for - [LINK] The first video goes into all the bits you're concerned about and all the things that Rust has tried before arriving where they are now
Read original comment ↗As you probably know, Rust ended up with async/await. This video goes deep into that and the alternatives, and it changed my opinions a bit: [VIDEO] Golang differs from Rust by having a runtime underneath. If you're already paying for that, it's probably better to do greenthreading than async/await, which is what Go did. I still find the Go syntax for this more bothersome and error-prone, as you said, but there are other solutions to that.
Read original comment ↗Java is different. Tomcat's thread pool is the older way. A lot of newer stuff was using something promises-related instead with an event loop. But then recently Java added virtual threads which should obviate the need for that, similar to Go. Rust considered virtual threads but chose against that because it requires a more abstracted runtime like Java and Go have. Great preso on this [VIDEO] All the "async" stuff is super poorly named. They mean cooperative multitasking, or I guess "async within a single kernel thread." Yeah multiple kernel threads are asynchronous but "async" doesn't mean that :S
Read original comment ↗