Stream: git-wasmtime

Topic: wasmtime / PR #2096 Wiggle: Fix #2053


view this post on Zulip Wasmtime GitHub notifications bot (Aug 04 2020 at 22:54):

pchickey edited PR #2096 from pch/issue-2053 to main:

This PR implements GuestType for GuestPtr<[T]>, and makes it possible to use witx arrays as members of structs or variants of unions.

The impl GuestType for GuestPtr<[T]> where T: GuestType was straightforward enough to write - its just like impl GuestType for GuestPtr<T>, except we read and write the pointer and length fields rather than just a pointer.

@kubkon did the work to get the lifetimes rendered properly in the code generator, this PR just fixed the missing impl and added a proptest to show that it works.

Closes #2053
Based on and supercedes #2054

<!--

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 (Aug 04 2020 at 22:54):

pchickey requested kubkon for a review on PR #2096.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 05 2020 at 01:41):

pchickey updated PR #2096 from pch/issue-2053 to main:

This PR implements GuestType for GuestPtr<[T]>, and makes it possible to use witx arrays as members of structs or variants of unions.

The impl GuestType for GuestPtr<[T]> where T: GuestType was straightforward enough to write - its just like impl GuestType for GuestPtr<T>, except we read and write the pointer and length fields rather than just a pointer.

@kubkon did the work to get the lifetimes rendered properly in the code generator, this PR just fixed the missing impl and added a proptest to show that it works.

Closes #2053
Based on and supercedes #2054

<!--

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 (Aug 05 2020 at 14:27):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 05 2020 at 16:52):

pchickey merged PR #2096.


Last updated: Nov 22 2024 at 16:03 UTC