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
For Rust type like Box<[u32]> in parameter, wasm-bindgen generates Uint32Array as type in the TypeScript declaration. However, the glue code generated uses TypedArray.set internally to pass the content into the linear memory, and that method actually accepts array of number as well.
Having the type being only TypedArray forces consumer to create an extra TypedArray and copy content into it first, which should be unnecessary.
The text was updated successfully, but these errors were encountered:
For Rust type like
Box<[u32]>
in parameter, wasm-bindgen generatesUint32Array
as type in the TypeScript declaration. However, the glue code generated usesTypedArray.set
internally to pass the content into the linear memory, and that method actually accepts array of number as well.Having the type being only
TypedArray
forces consumer to create an extraTypedArray
and copy content into it first, which should be unnecessary.The text was updated successfully, but these errors were encountered: