wasm-bindgen/crates
Alex Crichton 522e973694 wasm2es6js: Fix handling of start function
This is split out from #1002 and is intended to fix the tool's handling
of the `start` function. For the most accurate emulation of the wasm ESM
spec I believe we need to defer execution of the start function until
all our exports are wired up which should allow valid cyclical
references during instantiation.

The fix here is to remove the start function, if one is present, and
inject an invocation of it at the end of initialization (after our
exports are wired up). This fixes tests on #1002, but doesn't have any
direct analogue for tests here just yet.

Along the way because multiple files now come out of `wasm2es6js` by
default I've added an `--out-dir` argument as well as `-o` to ensure
that a folder for all outputs can be specified.
2018-11-29 11:52:23 -08:00
..
backend Add a #[wasm_bindgen(start)] attribute 2018-11-28 22:11:15 -08:00
cli wasm2es6js: Fix handling of start function 2018-11-29 11:52:23 -08:00
cli-support wasm2es6js: Fix handling of start function 2018-11-29 11:52:23 -08:00
futures Run rustfmt over everything 2018-11-27 12:07:59 -08:00
gc Run rustfmt over everything 2018-11-27 12:07:59 -08:00
js-sys Run rustfmt over everything 2018-11-27 12:07:59 -08:00
macro Add a #[wasm_bindgen(start)] attribute 2018-11-28 22:11:15 -08:00
macro-support Add a #[wasm_bindgen(start)] attribute 2018-11-28 22:11:15 -08:00
shared Add a #[wasm_bindgen(start)] attribute 2018-11-28 22:11:15 -08:00
test Bump to 0.2.28 2018-11-12 09:28:01 -08:00
test-macro Consistently use extern "C" 2018-11-27 12:27:00 -08:00
threads-xform Run rustfmt over everything 2018-11-27 12:07:59 -08:00
typescript Run rustfmt over everything 2018-11-27 12:07:59 -08:00
wasm-interpreter Run rustfmt over everything 2018-11-27 12:07:59 -08:00
web-sys Consistently use extern "C" 2018-11-27 12:27:00 -08:00
webidl Run rustfmt over everything 2018-11-27 12:07:59 -08:00
webidl-tests Consistently use extern "C" 2018-11-27 12:27:00 -08:00