Skip to content

Bring the Async Rust experience closer to parity with sync Rust #105

Open
@nikomatsakis

Description

@nikomatsakis
Metadata
Point of contact @tmandry
Team(s) compiler, lang, libs-api, spec, types
Goal document 2025h1/async

Summary

Over the next six months, we will continue bringing Async Rust up to par with "sync Rust" by doing the following:

  • Telling a complete story for the use of async fn in traits, unblocking wide ecosystem adoption,
  • Improving the ergonomics of Pin, which is frequently used in low-level async code, and
  • Preparing to support asynchronous (and synchronous) generators in the language.

Why this goal?

This work continues our drive to improve support for async programming in Rust. In 2024H2 we stabilized async closures; explored the generator design space; and began work on the dynosaur crate, an experimental proc-macro to provide dynamic dispatch for async functions in traits. In 2025H1 our plan is to deliver (1) improved support for async-fn-in-traits, completely subsuming the functionality of the async-trait crate; (2) progress towards sync and async generators, simplifying the creation of iterators and async data streams; (3) and improve the ergonomics of Pin, making lower-level async coding more approachable. These items together start to unblock the creation of the next generation of async libraries in the wider ecosystem, as progress there has been blocked on a stable solution for async traits and streams.

Tasks and status

Overall program management

Return type notation (rust-lang/rust#109417)

Unsafe binders (rust-lang/rust#130516)

Implementable trait aliases

async fn in dyn Trait (rust-lang/rust#133119)

Pin ergonomics

  • Implementation (@eholk)
  • Author RFC (@eholk)
  • Lang-team experiment (lang Team)
  • Lang-team champion (lang Team)

Trait for generators (sync)

Dynosaur 1.0

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Project goal

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions