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

Fix handling of u32 between Rust and JS #1401

Merged
merged 1 commit into from
Mar 27, 2019

Commits on Mar 27, 2019

  1. Fix handling of u32 between Rust and JS

    All numbers in WebAssembly are signed and then each operation on them
    may optionally have an unsigned version. This means that when we pass
    large signed numbers to JS they actually show up as large negative
    numbers even though JS numbers can faithfully represent the type.
    
    This is fixed by adding `>>>0` in a few locations in the generated
    bindings to coerce the JS value into an unsigned value.
    
    Closes rustwasm#1388
    alexcrichton committed Mar 27, 2019
    Configuration menu
    Copy the full SHA
    0160f6a View commit details
    Browse the repository at this point in the history