wasm-bindgen/tests
Alex Crichton 13cac2d0c4 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 #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.
2018-10-10 17:46:51 -07:00
..
crates cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
no-std cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
wasm Fix generated shims if APIs don't exist 2018-10-10 17:46:51 -07:00
headless.rs cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
non_wasm.rs cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00
std-crate-no-std-dep.rs cargo +nightly fmt --all 2018-09-26 08:26:00 -07:00