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

Better BigInt conversions #3049

Merged
merged 1 commit into from Aug 31, 2022

Conversation

RReverser
Copy link
Member

Add some [iu](64|128) intrinsics to convert large numbers to JsValue directly, without stringifying and parsing them back.

Also adding a few more tests as previously those conversions didn't have any test coverage.

Add some [iu](64|128) intrinsics to convert large numbers to JsValue directly, without stringifying and parsing them back.

Also adding a few more tests as previously those conversions didn't have any test coverage.
Copy link
Collaborator

@Liamolucko Liamolucko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good apart from a minor nitpick.

crates/cli-support/src/js/mod.rs Show resolved Hide resolved
Copy link
Collaborator

@hamza1311 hamza1311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

src/lib.rs Show resolved Hide resolved
@Liamolucko Liamolucko merged commit b734d34 into rustwasm:main Aug 31, 2022
@RReverser RReverser deleted the better-from-iu64-for-jsvalue branch August 31, 2022 22:19
RReverser added a commit to RReverser/serde-wasm-bindgen that referenced this pull request Sep 1, 2022
As of rustwasm/wasm-bindgen#3049 the builtin conversions no longer use strings, but pass numbers directly, so our custom intrinsic is no longer necessary.
RReverser added a commit to RReverser/serde-wasm-bindgen that referenced this pull request Sep 1, 2022
As of rustwasm/wasm-bindgen#3049 the builtin conversions no longer use strings, but pass numbers directly, so our custom intrinsic is no longer necessary.
RReverser added a commit to RReverser/serde-wasm-bindgen that referenced this pull request Sep 1, 2022
As of rustwasm/wasm-bindgen#3049 the builtin conversions no longer use strings, but pass numbers directly, so our custom intrinsic is no longer necessary.
RReverser added a commit to RReverser/serde-wasm-bindgen that referenced this pull request Sep 1, 2022
As of rustwasm/wasm-bindgen#3049 the builtin conversions no longer use strings, but pass numbers directly, so our custom intrinsic is no longer necessary.
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.

None yet

3 participants