mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-11-23 22:11:19 +03:00
13cac2d0c4
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. |
||
---|---|---|
.. | ||
crates | ||
no-std | ||
wasm | ||
headless.rs | ||
non_wasm.rs | ||
std-crate-no-std-dep.rs |