Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
10 of 31 tasks
nikomatsakis opened this issue Jul 22, 2024 · 3 comments
Open
10 of 31 tasks

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jul 22, 2024

Metadata
Owner(s) @tmandry, @nikomatsakis
Team(s) compiler, lang, libs, libs-api
Goal document 2024h2/async

Summary

Over the next six months, we will deliver several critical async Rust building block features

Tasks and status

@nikomatsakis
Copy link
Contributor Author

This issue is intended for status updates only.

For general questions or comments, please contact the owner(s) directly.

@tmandry
Copy link
Member

tmandry commented Jul 30, 2024

Status update: July 30, 2024

Key developments

Blockers

We are able to make some progress in each area, but the biggest upcoming blocker we can see is:

  • Lang team deciding on final syntax for async closure bounds

Help wanted

There will be a call for testing async closures on the Inside Rust blog soon. Please check it out and give them a try in your own async code!

We'd like to see an updated RFC for implementable trait aliases that follows the guidelines laid out in this comment.

@nikomatsakis
Copy link
Contributor Author

nikomatsakis commented Sep 19, 2024

Executive summary.

We are generally on track with our marquee features: (1) Support for async closures is available on Nightly and the lang team arrived at a tentative consensus to keep the existing syntax (written rationale and formal decision are in progress). We issued a call for testing as well which has so far uncovered no issues. (2) Partial support for Return Type Notation is available on Nightly with the remainder under review. In addition, dynamic dispatch for async functions and experimental async drop work both made implementation progress. Async WG reorganization has made no progress.

Detailed updates

For this year's goal we are focused on three items:

  • Stabilizing async closures:
    • The Async Closures RFC has been accepted and the feature is available for use on Nightly under the async_closure feature gate. We put out a call for testing; so far, no problems have been reported. Stabilization stalled because of a need to resolve the syntax. Lang team has reached a tentative internal consensus in favor of the syntax as implemented (impl async Fn). Next steps are (1) lang team to write up rationale and finalizing syntax decision; (2) author stabilization report.
  • Resolving "Send Bounds" via Return Type Notation:
    • The Return Type Notation RFC has been accepted and partially implemented under the feature gate return_type_notation. Bounds like Trait<method(): Send> are available on Nightly; bounds like Trait::method(): Send will be available once PR #129629 is merged. Next steps are to (1) merge PR #129629; (2) call for testing; and (3) author stabilization report.
  • Dyn dispatch for async functions in traits:
    • Async functions in traits were stabilized last year without support for dynamic dispatch. For this year we plan to release a procedural macro that can help users workaround this limitation; native support is planned for future years. The all important task of selecting a crate name was completed, with dynosaur being chosen. Basic support is now implemented (see this example). Next steps are polish and putting out a call for testing.
  • Async drop experiments:
    • PRs with experimental implementation work for async drop are ready and awaiting review (PR list).

We have not made progress on Async WG reorganization.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants