Skip to content
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

Convert Big[Ui,I]nt64Array bindings to use [u/i]64 #3011

Merged
merged 1 commit into from
Jul 29, 2022

Conversation

ishitatsuyuki
Copy link
Contributor

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: #3009
Fixes: d6d056c ("Add math-related intrinsics/functions for JsValues (#2629)")

Breaking change: This is technically a breaking change, but I'm not sure if anyone has managed to use it in the old state.

I added some brief tests but I haven't tested all the functions yet. Will do some more testing later in my own project.

@Liamolucko Liamolucko requested a review from alexcrichton July 29, 2022 10:20
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)")
@alexcrichton
Copy link
Contributor

Thanks for this! I agree that the previous signatures were too broken to work so fixing them should be fine, despite the breakage.

@alexcrichton alexcrichton merged commit 6daa3d1 into rustwasm:main Jul 29, 2022
@ishitatsuyuki ishitatsuyuki deleted the u64array branch July 29, 2022 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BigUint64Array/BigInt64Array should be constructed from u64 arrays, not BigInt arrays
2 participants