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 generated shims if APIs don't exist #959

Merged
merged 1 commit into from
Oct 12, 2018

Commits on Oct 11, 2018

  1. Fix generated shims if APIs don't exist

    This commit fixes instantiation of the wasm module even if some of the
    improted APIs don't exist. This extends the functionality initially
    added in rustwasm#409 to attempt to gracefully allow importing values from the
    environment which don't actually exist in all contexts. In addition to
    nonexistent methods being handled now entire nonexistent types are now
    also handled.
    
    I suspect that eventually we'll add a CLI flag to `wasm-bindgen` to say
    "I assert everything exists, don't check it" to trim out the extra JS
    glue generated here. In the meantime though this'll pave the way for a
    wasm-bindgen shim to be instantiated in both a web worker and the main
    thread, while using DOM-like APIs only on the main thread.
    alexcrichton committed Oct 11, 2018
    Configuration menu
    Copy the full SHA
    13cac2d View commit details
    Browse the repository at this point in the history