Skip to content

Provide a way to detect asyncified exports #2322

Open
@RReverser

Description

@RReverser

Currently, Asyncify pass transforms only functions that call into potentially asynchronous imports (directly or indirectly) and leaves others untouched.

However, from the JavaScript wrapper side, it's impossible to know which exports ended up being asyncified and which not, and so all exported functions end up being transformed into async ones even if it's unnecessary.

In order to improve efficiency and provide an async API only for exports that actually require it, Asyncify pass should somehow mark the transformed exports.

There are two potential ways to go about this: 1) add custom prefix or suffix to export names which would be detected as a marker and stripped by the JS wrapper or 2) add a custom section(s?) listing all such export names that could be read by JS wrapper using WebAssembly.customSections('asyncify').

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions