rustwasm / wasm-bindgen

Facilitating high-level interactions between Wasm modules and JavaScript
https://rustwasm.github.io/docs/wasm-bindgen/
Apache License 2.0
7.83k stars 1.08k forks source link

Fixed invalid type annotation for multivalue returns #4210

Closed RunDevelopment closed 3 weeks ago

RunDevelopment commented 1 month ago

fixes #4207

Array itself is not a valid type because it requires one generic parameter. I replaced it with number[]. I chose number as the element type, because that's what the surrounding code is using for everything.

Using number for everything is probably wrong, since WASM uses bigint for 64-bit ints AFAIK, but it shouldn't matter too much.

RunDevelopment commented 1 month ago

CI fails because CI uses the latest stable compiler (Rust 1.82 now), which uses multi-value returns by default. This means that the generated WASM and JS code will be different in all tests now.