pchickey opened PR #2701 from pch/wiggle_async
to main
:
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
pchickey updated PR #2701 from pch/wiggle_async
to main
.
pchickey updated PR #2701 from pch/wiggle_async
to main
.
pchickey updated PR #2701 from pch/wiggle_async
to main
.
pchickey updated PR #2701 from pch/wiggle_async
to main
.
pchickey updated PR #2701 from pch/wiggle_async
to main
.
pchickey updated PR #2701 from pch/wiggle_async
to main
.
pchickey updated PR #2701 from pch/wiggle_async
to main
.
pchickey updated PR #2701 from pch/wiggle_async
to main
.
pchickey updated PR #2701 from pch/wiggle_async
to main
.
pchickey updated PR #2701 from pch/wiggle_async
to main
.
pchickey edited PR #2701 from pch/wiggle_async
to main
:
Following #2434, wiggle now supports async functions. Users of the wiggle macro can specify which functions should be async with a new
async_
section of the settings.The new integration test of wasmtime-wiggle shows async support working end-to-end: https://github.com/bytecodealliance/wasmtime/pull/2701/files#diff-9b1eee5f3bd355b0c43aa2ec5d647ddcc085d50f81324540cdbbce39ca6de21b
I rewrote a bunch of the doc test to document the new functionality, plus other earlier changes that had been left out: https://github.com/bytecodealliance/wasmtime/blob/1e4cde62ab510f6c5b551ab73203b48bff707635/crates/wiggle/macro/src/lib.rs
During this work I realized that the wiggle::from_witx macro did not need to take the user's so-called
ctx
type as an argument to the macro. Instead, all code generated bywiggle
is generic - it will accept any type which implements the required traits. (Async lifetime issues meant it was easier to make this particular type generic rather than concrete, because lifetime parameters can't be elided in some async fn contexts.) Thewasmtime-wiggle
integration does still require the user to specify a concrete ctx type.Over in
crates/wasmtime
, I added a missing functionLinker::instantiate_async
, for use with async stores.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
pchickey requested alexcrichton for a review on PR #2701.
pchickey has marked PR #2701 as ready for review.
pchickey updated PR #2701 from pch/wiggle_async
to main
.
alexcrichton submitted PR Review.
alexcrichton submitted PR Review.
alexcrichton created PR Review Comment:
Could this parse the
async
keyword itself to avoid the underscore? (given this is a macro I'd assume we could do whatever syntax we wanted here)
pchickey submitted PR Review.
pchickey created PR Review Comment:
Sure. I don't know why I never thought of that.
pchickey updated PR #2701 from pch/wiggle_async
to main
.
pchickey merged PR #2701.
Last updated: Nov 22 2024 at 17:03 UTC