Stream: git-wasmtime

Topic: wasmtime / PR #2701 wiggle: support for Rust async


view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2021 at 01:28):

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.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2021 at 20:28):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 03 2021 at 22:41):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 04 2021 at 01:54):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 04 2021 at 21:01):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 04 2021 at 21:43):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 04 2021 at 21:54):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 04 2021 at 21:55):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 04 2021 at 22:52):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 04 2021 at 23:38):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 01:29):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 01:36):

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 by wiggle 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.) The wasmtime-wiggle integration does still require the user to specify a concrete ctx type.

Over in crates/wasmtime, I added a missing function Linker::instantiate_async, for use with async stores.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 01:36):

pchickey requested alexcrichton for a review on PR #2701.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 01:36):

pchickey has marked PR #2701 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 02:16):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 15:18):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 15:18):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 15:18):

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)

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 16:40):

pchickey submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 16:40):

pchickey created PR Review Comment:

Sure. I don't know why I never thought of that.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 17:00):

pchickey updated PR #2701 from pch/wiggle_async to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 05 2021 at 18:43):

pchickey merged PR #2701.


Last updated: Nov 22 2024 at 17:03 UTC