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

add async support to wit_component::dummy_module #1960

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

dicej
Copy link
Collaborator

@dicej dicej commented Dec 19, 2024

This allows us to round-trip fuzz test using the async ABI(s) as well as the sync one. I've also added corresponding --async-callback and --async-stackful options to the component embed --dummy subcommand for generating dummy modules which use the new ABIs.

Note that this currently only generates ultra-minimal, non-functional modules. A real module would import the task.return intrinsic with the appropriate signature for each async export, and would presumably use other new intrinsics such as subtask.drop, task.backpressure, etc. -- not to mention the various stream.*, future.*, and error-context.* intrinsics. For more thorough fuzz testing, we'll want to generate imports for all known intrinsics (although we probably wouldn't do that for component embed --dummy modules, since it would be more confusing than helpful).

This allows us to round-trip fuzz test using the async ABI(s) as well as the
sync one.  I've also added corresponding `--async-callback` and
`--async-stackful` options to the `component embed --dummy` subcommand for
generating dummy modules which use the new ABIs.

Note that this currently only generates ultra-minimal, non-functional modules.
A real module would import the `task.return` intrinsic with the appropriate
signature for each async export, and would presumably use other new intrinsics
such as `subtask.drop`, `task.backpressure`, etc. -- not to mention the various
`stream.*`, `future.*`, and `error-context.*` intrinsics.  For more thorough
fuzz testing, we'll want to generate imports for all known intrinsics (although
we probably wouldn't do that for `component embed --dummy` modules, since it
would be more confusing than helpful.

Signed-off-by: Joel Dice <[email protected]>
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexcrichton alexcrichton added this pull request to the merge queue Dec 19, 2024
Merged via the queue into bytecodealliance:main with commit 57b1ace Dec 19, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants