Skip to content

Tracking Issue: Async support for C++ binding #5194

@PragmaTwice

Description

@PragmaTwice

Feature Description

Related to #2981, #3156.

Problem and Solution

We can add async support for C++ binding since C++20 coroutine is already a widely-used feature.

By utilizing cxx-async lib, we can generate interop code between Rust async/await and C++20 coroutines.

For C++ coroutine runtimes, cxx-async currently supports cppcoro and folly. We can further add support of asio and (maybe) libunifex, since asio is the de-facto networking lib and libunifex is the impl of std::execution which will be merged into c++26? (29? 32?).

For other coroutines (mostly stackful coroutine libs), like Boost.Fiber, Boost.Coroutine2, currently it's out of our interest.

Additional Context

Are you willing to contribute to the development of this feature?

  • Yes, I am willing to contribute to the development of this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions