without.boats Topics: Async/await design, Pin, coroutines, ownership, generators Why RustGrep includes it: Where async/await syntax was designed. Categories: core, async
In July, I described a way to make pinning more ergonomic by integrating it more fully into the language. Last week, I develoepd that idea further with the notion of UnpinCell: a wrapper type that lets a user take an &pin mut UnpinCell<T> a...
A variation on my previous design for pinned places has occurred to me that would be more consistent with Rust’s existing feature set.The most outlandish aspect of the previous design was the notion of “pinned fields,” which support pinned...
July 23, 2024In the previous post, I described the goal of Rust’s Pin type and the history of how it came to exist. When we were initially developing this API in 2018, one of our explicit goals was the limit the number of changes we would m...
July 19, 2024The Pin type (and the concept of pinning in general) is a foundational building block on which the rest of the the Rust async ecosystem stands. Unfortunately, it has also been one of the least accessible and most misunderstood...
June 22, 2024This post is meant as an explainer about how substructural type theory can be applied in programming language design. Terms like “substructural type theory” tend to scare and confuse programmers who don’t write Haskell on the w...
May 13, 2024In a high-level language, the programmer is deprived of the dangerous power to update his own program while it is running. Even more valuable, he has the power to split his machine into a number of separate variables, arrays, fi...
April 20, 2024For the past few months I’ve been mulling over some things that Russell Johnston made me realize about the relationship between effect systems and coroutines. You can read more of his thoughts on this subject here, but he made...
March 13, 2024This is a brief note about the definition of iterator.In previous posts, I’ve written about a taxonomic confusion I think has arisen within the Rust project about AsyncIterator, in which it was conceived as “the async-modified...
February 24, 2024One problem with the design of async Rust is what do about async clean-up code. Consider that you have a type representing some object or operation (like an async IO handle) and it runs clean up code when you are done using...
February 18, 2024In my previous post, I wrote about the distinction between “multi-task” and “intra-task” concurrency in async Rust. I want to open this post by considering a common pattern that users encounter, and how they might implement...
February 3, 2024In the early-to-mid 2010s, there was a renaissance in languages exploring new ways of doing concurrency. In the midst of this renaissance, one abstraction for achieving concurrent operations that was developed was the “futur...
December 12, 2023Last week, Tyler Mandry published an interesting post about a problem that the Rust project calls “Barbara battles buffered streams.” Tyler does a good job explaining the issue, but briefly the problem is that the buffering...
November 30, 2023When we developed the Pin API, our vision was that “ordinary users” - that is, users using the “high-level” registers of Rust, would never have to interact with it. We intended that only users implementing Futures by hand,...
November 27, 2023In my previous post, I said that the single best thing the Rust project could do for users is stabilize AsyncIterator. I specifically meant the interface that already exists in the standard library, which uses a method call...
November 7, 2023Four years ago today, the Rust async/await feature was released in version 1.39.0. The announcement post says that “this work has been a long time in development – the key ideas for zero-cost futures, for example, were first...
October 15, 2023Async/await syntax in Rust was initially released to much fanfare and excitement. To quote Hacker News at the time:This is going to open the flood gates. I am sure lot of people were just waiting for this moment for Rust ado...
October 6, 2023I want to address a controversy that has gripped the Rust community for the past year or so: the choice by the prominent async “runtimes” to default to multi-threaded executors that perform work-stealing to balance work dynam...
I want to wrap up my consideration of the idea of adding new auto traits to Rust with some notes from a conversation I had with Ariel Ben-Yehuda.You can read these two previous posts for context:Changing the rules of RustFollow up to “Chang...
September 18, 2023In my previous post, I described the idea of using an edition mechanism to introduce a new auto trait. I wrote that the compiler would need to create an “unbreakable firewall” to prevent using !Leak types from the new edit...