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 }}
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Reading the discussions re mappings between GC objects and host objects, I see that they focus mostly on structs.
I'm wondering if it would make sense to treat arrays separately. The reasons for that are:
there could be a significant performance benefit in directly mapping WebAssembly arrays, thanks to 0-copy.
they could be used as an intermediate 0-copy solution for strings until the Strings proposal is reprioritized and delivered.
unlike structs, the meaning of arrays doesn't vary significantly across programming languages. It could help reach consensus on the spec more rapidly for arrays than for structs, and see a MVP soon after.
it would free the structs mapping spec from array related constraints.
As an example, an i32 unpacked array would map to:
Int32Array in JS
int[] in Java
int[] in C#
...
similarly, an i32 array packed using Int8 would map to:
Int8Array in JS
byte[] in Java
sbyte[] in C#
...
Would it make sense to submit a draft Post-MVP PR focused on array mapping ?