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

Remove class wrap for constructors in Rust exports #3562

Merged
merged 6 commits into from
Aug 25, 2023

Commits on Aug 18, 2023

  1. Remove class wrap for constructors in Rust exports

    After rustwasm#1594 constructors of Rust exported structs started using class
    wrapping when generating JS shims. Wrapping erases prototype information
    from the object instance in JS and as a result it is not possible to
    override methods (via inheritance) of the generated class.
    
    Additionally, some checks to ensure constructors always return an
    instance of `Self` were lost.
    
    This PR is rebased from rustwasm#3561, it passes the constructor information
    from the `Builder` into the instruction translation function which
    is then used to modify the generated bindings.
    
    The `return` statement is also removed instead the value is directly
    attached to the instance.
    
    Signed-off-by: Oliver T <[email protected]>
    snOm3ad committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    bd5da44 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. Fix typo

    Co-authored-by: Liam Murphy <[email protected]>
    snOm3ad and Liamolucko authored Aug 24, 2023
    Configuration menu
    Copy the full SHA
    cecb629 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dfb1c73 View commit details
    Browse the repository at this point in the history
  3. Disallow returning JS primitives from constructors

    Signed-off-by: Oliver T <[email protected]>
    snOm3ad committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    c9bab0a View commit details
    Browse the repository at this point in the history
  4. Added missing String in match

    Signed-off-by: Oliver T <[email protected]>
    snOm3ad committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    783fbf7 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2023

  1. Handle nested descriptors

    Signed-off-by: Oliver T <[email protected]>
    snOm3ad committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    a7d253b View commit details
    Browse the repository at this point in the history