[ffi] @Native
for global fixed-size arrays
#54337
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
library-ffi
P3
A lower priority bug or feature request
triaged
Issue has been triaged by sub team
https://dart-review.googlesource.com/c/sdk/+/338020 adds support for #50551, but does not add support for global fixed size arrays.
Could theoretically be bound to.
It just so happens to be that currently the following works because the memory layout is identical.
The advantage of supporting the latter is that we can do bound checks on use.
@simolus3 Thanks for making the
Array
limitation explicit in https://dart-review.googlesource.com/c/sdk/+/338020. Here are some of my thoughts about it.Re dart-lang/native#860, should we temporarily support generating
Pointer
s for fixed-size global arrays? That would make it a breaking change later to make it Arrays, though. On the other hand, if users would like to use those fields than without generatingPointer
s, users can't use FFIgen at all.The text was updated successfully, but these errors were encountered: