Thumbnail for {{ page.title }}

Legal notice

👋 This page was last updated ~2 years ago. Just so you know.

https://fasterthanli.me is a publication of https://bearcove.eu

Here's another article just for you:

The thumbnail for this page

Catching up with async Rust

In December 2023, a minor miracle happened: async fn in traits shipped.

As of Rust 1.39, we already had free-standing async functions:

pub async fn read_hosts() -> eyre::Result<Vec<u8>> { // etc. }

…and async functions in impl blocks:

impl HostReader { pub async fn read_hosts(&self) -> eyre::Result<Vec<u8>> { // etc. } }