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.
I'm probably missing the obvious but I can't seem to find a way to dynamically populate a non mutable array:
there is no array.new_xxx for initializing a new array from existing array data or from linear memory
array.set fails if dest array is not mutable
array.copy fails if dest array is not mutable
There are many scenarios where a non-mutable array needs to be dynamically populated rather than sourced from static data. Some examples:
string literal: init non mutable array from utf-8 data, convert it to utf-16 stored into a mutable array, init the string struct with a non mutable array copied from the previous mutable array