-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigUint64Array/BigInt64Array should be constructed from u64 arrays, not BigInt arrays #3009
Labels
Comments
Liamolucko
added
the
breaking-change
Tracking breaking changes for the next major version bump (if ever)
label
Jul 29, 2022
You're right, but unfortunately it's a breaking change to fix it. |
Well, does the old signature even work? It sounds like it will read garbage since the type signature doesn't make much sense? |
ishitatsuyuki
added a commit
to ishitatsuyuki/wasm-bindgen
that referenced
this issue
Jul 29, 2022
Using BigInt as the macro parameters leads to absurd signatures like slices of BigInt objects (can't exist). Instead, just use the numeric types. bindgen already converts them to bigint when appropriate. Closes: rustwasm#3009 Fixes: d6d056c ("Add math-related intrinsics/functions for `JsValue`s (rustwasm#2629)")
ishitatsuyuki
added a commit
to ishitatsuyuki/wasm-bindgen
that referenced
this issue
Jul 29, 2022
Using BigInt as the macro parameters leads to absurd signatures like slices of BigInt objects (can't exist). Instead, just use the numeric types. bindgen already converts them to bigint when appropriate. Closes: rustwasm#3009 Fixes: d6d056c ("Add math-related intrinsics/functions for `JsValue`s (rustwasm#2629)")
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
In https://docs.rs/js-sys/latest/js_sys/struct.BigUint64Array.html, various methods like
pub fn copy_from(&self, src: &[BigInt])
takes a slice ofBigInt
s. ButBigInt
is an object, and this just doesn't look right. When indexed from JS code they should indeed return a BigInt object, but from the view of wasm their representation should be a u64.The text was updated successfully, but these errors were encountered: