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

Add TryFrom<JsValue> for [iu](64|128) #3058

Merged
merged 3 commits into from Sep 4, 2022

Commits on Sep 4, 2022

  1. Add TryFrom<JsValue> for [iu](64|128)

    Adds a way to convert `JsValue` or a `BigInt` to `i64`/`u64`/`i128`/`u128` with type and range checks, returning the original `JsValue` otherwise.
    
    This could be optimised a little bit further via more intrinsics, but it's good enough for the initial implementation, so leaving any optimisations for the future.
    
    Fixes rustwasm#2350.
    RReverser committed Sep 4, 2022
    Configuration menu
    Copy the full SHA
    9aa0978 View commit details
    Browse the repository at this point in the history
  2. Extract helper

    RReverser committed Sep 4, 2022
    Configuration menu
    Copy the full SHA
    12ffc2b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3b42e9e View commit details
    Browse the repository at this point in the history