smallcultfollowing.com
I recently posted a draft of an RFC about Return Type Notation to the async working group Zulip stream. In response, Josh Triplett reached out to me to raise some concerns. Talking to him gave rise to a 3rd idea for how to resolve the send...
Observations/Thoughts
2023-06-14
~9 min read
smallcultfollowing.com
In a previous post on async closures, I concluded that the best way to support async closures was with an async trait combinator. I’ve had a few conversations since the post and I want to share some additional thoughts. In particular, this...
Observations/Thoughts
2023-05-17
~15 min read
smallcultfollowing.com
I previously introduced the “send bound” problem, which refers to the need to add a Send bound to the future returned by an async function. This post continues my tour over the various solutions that are available. This post covers “Trait T...
Observations/Thoughts
2023-03-08
~10 min read
smallcultfollowing.com
In the previous post, I introduced the “send bound” problem, which refers to the need to add a Send bound to the future returned by an async function. I want to start talking about some of the ideas that have been floating around for how to...
Observations/Thoughts
2023-02-22
~13 min read
smallcultfollowing.com
Nightly Rust now has support for async functions in traits, so long as you limit yourself to static dispatch. That’s super exciting! And yet, for many users, this support won’t yet meet their needs. One of the problems we need to resolve is...
Observations/Thoughts
2023-02-08
~7 min read
smallcultfollowing.com
When I started working on Rust in 2011, my daughter was about three months old. She’s now in sixth grade, and she’s started growing rapidly. Sometimes we wake up to find that her clothes don’t quite fit anymore: the sleeves might be a littl...
Observations/Thoughts
2023-01-25
~12 min read
smallcultfollowing.com
After my last post on dyn async traits, some folks pointed out that I was overlooking a seemingly obvious possibility. Why not have the choice of how to manage the future be made at the call site? It’s true, I had largely dismissed that alt...
Rust Walkthroughs
2022-09-28
~14 min read
smallcultfollowing.com
I’ve been thinking about what “Rust 2024” will look like lately. I don’t really mean the edition itself — but more like, what will Rust feel like after we’ve finished up the next few years of work? I think the answer is that Rust 2024 is go...
Rust Walkthroughs
2022-09-28
~7 min read
smallcultfollowing.com
In the last few months, Tyler Mandry and I have been circulating a “User’s Guide from the Future” that describes our current proposed design for async functions in traits. In this blog post, I want to deep dive on one aspect of that proposa...
Observations/Thoughts
2022-09-21
~19 min read
smallcultfollowing.com
Re-reading my previous post, I felt I should clarify why I called it the “soul of Rust”. The soul of Rust, to my mind, is definitely not being explicit about allocation. Rather, it’s about the struggle between a few key values — especially...
Observations/Thoughts
2022-09-21
~5 min read
smallcultfollowing.com
Have you heard of the Salsa project? Salsa is a library for incremental computation – it’s used by rust-analyzer, for example, to stay responsive as you type into your IDE (we have also discussed using it in rustc, though more work is neede...
Observations/Thoughts
2022-08-24
~4 min read
smallcultfollowing.com
As some of you may know, on May 4th Jack Huey opened a PR to stabilize an initial version of generic associated types. The current version is at best an MVP: the compiler support is limited, resulting in unnecessary errors, and the syntax i...
Observations/Thoughts
2022-06-29
~11 min read
smallcultfollowing.com
You’ve probably heard that the Rust type checker can be a great “co-pilot”, helping you to avoid subtle bugs that would have been a royal pain in the !@#!$! to debug. This is truly awesome! But what you may not realize is how it feels in th...
Observations/Thoughts
2022-06-22
~13 min read
smallcultfollowing.com
Lately I’ve been diving deep into tokio’s mini-redis example. The mini-redis example is a great one to look at because it’s a realistic piece of quality async Rust code that is both self-contained and very well documented. Digging into mini...
Observations/Thoughts
2022-06-15
~22 min read
smallcultfollowing.com
Rust has been wrestling with coherence more-or-less since we added methods; our current rule, the “orphan rule”, is safe but overly strict. Roughly speaking, the rule says that one can only implement foreign traits (that is, traits defined...
Observations/Thoughts
2022-04-20
~10 min read
smallcultfollowing.com
There are two ergonomic features that have been discussed for quite some time in Rust land: perfect derive and expanded implied bounds. Until recently, we were a bit stuck on the best way to implement them. Recently though I’ve been working...
Rust Walkthroughs
2022-04-13
~10 min read
smallcultfollowing.com
Last Friday, tmandry, cramertj, and I had an exciting conversation. We were talking about the design for combining async functions in traits with dyn Trait that tmandry and I had presented to the lang team on Friday. cramertj had an insight...
Observations/Thoughts
2022-03-30
~17 min read
smallcultfollowing.com
Last year, we shipped Rust 2021 and I have found the changes to be a real improvement in usability. Even though the actual changes themselves were quite modest, the combination of precise capture closure and simpler formatting strings (prin...
Observations/Thoughts
2022-02-16
~12 min read
smallcultfollowing.com
One of the things people often complain about when doing Async Rust is cancellation. This has always been a bit confusing to me, because it seems to me that async cancellation should feel a lot like panics in practice, and people don’t comp...
Observations/Thoughts
2022-02-02
~6 min read
smallcultfollowing.com
Hi all! Welcome to 2022! Towards the end of last year, Tyler Mandry and I were doing a lot of iteration around supporting “dyn async trait” – i.e., making traits that use async fn dyn safe – and we’re starting to feel pretty good about our...
Observations/Thoughts
2022-01-12
~8 min read