Remove --wasm2js flag entirely

This commit is contained in:
Bradlee Speice
2018-09-03 13:56:55 -04:00
parent c69833f253
commit 0965b77af8
4 changed files with 4 additions and 190 deletions

View File

@ -12,10 +12,6 @@ $ ./build.sh
When opened in a web browser this should print "Hello, World!" to the console.
This example uses the `wasm2es6js` tool to convert the wasm file to an ES module
that's implemented with asm.js instead of WebAssembly. The conversion to asm.js
is done by [binaryen]'s `wasm2js` tool internally.
Note that the `wasm2js` tool is still pretty early days so there's likely to be
a number of bugs to run into or work around. If any are encountered though
please feel free to report them upstream!

View File

@ -12,11 +12,8 @@ cargo +nightly run --manifest-path ../../crates/cli/Cargo.toml \
--no-demangle \
../../target/wasm32-unknown-unknown/release/asmjs.wasm --out-dir .
# Run the `wasm2es6js` primarily with the `--wasm2js` flag, which will
# internally execute `wasm2js` as necessary
cargo +nightly run --manifest-path ../../crates/cli/Cargo.toml \
--bin wasm2es6js -- \
asmjs_bg.wasm --wasm2js -o asmjs_bg.js
# Run the `wasm2js` tool from `binaryen`
wasm2js asmjs_bg.wasm -o asmjs_bg.js
# Move our original wasm out of the way to avoid cofusing Webpack.
mv asmjs_bg.wasm asmjs_bg.bak.wasm