You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Structs that hold pointers to arrays of structs should have lifetime parameters #907
pDescriptorRanges points to the start of an array of NumDescriptorRanges D3D12_DESCRIPTOR_RANGE instances. The generated rust type should have an appropriate lifetime parameter indicate that this array must be valid for as long as the D3D12_ROOT_DESCRIPTOR table instance is valid.
This pattern exists across many D3D12 structs, and possibly in other Win32 ones as well.
Currently, win32metadata does not include anything associating these two fields together, so it is likely some work will be required there. I think we need to agree that including these lifetime parameters is the right thing to do, figure out what metadata is required and get the appropriate issue filed. Once that's done we'll be able to do the windows-rs work to resolve this issue.
Sweet, thanks for opening the issue. I have other issues open for supporting arrays in general, which I currently only support minimally, but this will be useful to track this specific pattern.
We'll need another issue on the win32metadata repo for adding metadata to account for the _Field_size_full_(NumDescriptorRanges) SAL annotation. The metadata already parses SAL annotations so that shouldn't be a problem - we just need to get them to add this one somehow.
Activity
damyanp commentedon Jun 23, 2021
Currently, win32metadata does not include anything associating these two fields together, so it is likely some work will be required there. I think we need to agree that including these lifetime parameters is the right thing to do, figure out what metadata is required and get the appropriate issue filed. Once that's done we'll be able to do the windows-rs work to resolve this issue.
kennykerr commentedon Jun 23, 2021
Sweet, thanks for opening the issue. I have other issues open for supporting arrays in general, which I currently only support minimally, but this will be useful to track this specific pattern.
We'll need another issue on the win32metadata repo for adding metadata to account for the
_Field_size_full_(NumDescriptorRanges)SAL annotation. The metadata already parses SAL annotations so that shouldn't be a problem - we just need to get them to add this one somehow.kennykerr commentedon Jun 23, 2021
Other array-related issues: #212 #443 #479 #790
I hope to address all of these together when I get a moment, but it will be good to have the metadata ready before then.
kennykerr commentedon Jul 22, 2022
Doesn't look like there's been any progress metadata issue. microsoft/win32metadata#547
I'll close this issue for now but keep an eye on that metadata issue. If that is resolved, we can revisit this.
stormshield-gt commentedon Mar 5, 2025
Hi, sorry for commenting on old issue, the meta issue has been closed microsoft/win32metadata#547 so maybe we can revisit this one ?