RustcContributor::explore: @eholk session - dyn* and dyn async fns

Explore the future of Rust's async/await features with DynStar, a new abstraction that converts async functions to sync functions, reducing boilerplate code and simplifying error handling.

Key takeaways
  • DynStar is a new feature in Rust that abstracts over dynamic dispatch and async/await blocks.
  • It can be used to convert async functions into sync functions, reducing boilerplate code.
  • DynStar uses a unique vtable layout and a “box” trait to abstract over the creation of DynStar objects.
  • DynStar objects can be created from trait objects, and can be used as return values for async functions.
  • The DynStar feature is still experimental and needs more testing and iteration.
  • The speaker hopes to finalize the design and implement the feature soon.
  • The speaker is open to feedback and suggestions for improving the feature.
  • DynStar is not a replacement for existing async/await features, but rather a complement to them.
  • The speaker believes that DynStar can help simplify error handling and reduce boilerplate code in async/await blocks.
  • DynStar can be used to create async readers and writers that can be used in a variety of applications.
  • The speaker is working on a PR to add DynStar support to the Rust compiler.
  • The speaker is open to collaboration and invites feedback and suggestions from the community.
  • The DynStar feature is still evolving and needs more work to become stable.