Commit Graph

9 Commits

Author SHA1 Message Date
Alex Crichton
48f4adfa8c Run rustfmt over everything 2018-11-27 12:07:59 -08:00
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
Alex Crichton
4993e45fd9 Squash a few warnings that snuck in by accident 2018-10-10 16:09:24 -07:00
Alex Crichton
b868185637 Add tests for internal imports now working
These compiler bugs have now been fixed on nightly, so we just need to
wait for the bug fixes to ride the trains to be available to everyone!

Closes #201
2018-10-08 09:47:17 -07:00
Alex Crichton
7ecf4aae87 cargo +nightly fmt --all
Rustfmt all the things!
2018-09-26 08:26:00 -07:00
Alex Crichton
d5b81595ec Remove support for the version attribute
First added in #161 this never ended up panning out, so let's remove the
experimental suport which isn't actually used by anything today and hold off on
any other changes until an RFC happens.
2018-08-06 13:30:28 -05:00
Alex Crichton
7f8d510f3d Move unused_imports_not_generated test to wasm 2018-08-06 11:28:08 -07:00
Alex Crichton
8513858973 Move $-renaming tests to wasm 2018-08-06 09:51:29 -07:00
Alex Crichton
b4601295d0 Migrate most import tests to wasm 2018-08-05 12:35:47 -05:00