pchickey opened PR #2096 from pch/issue-2053
to main
:
This PR implements
GuestType
forGuestPtr<[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 likeimpl 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.
[ ] 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.
-->
Last updated: Dec 23 2024 at 12:05 UTC