Fix some references I missed

This commit is contained in:
Bradlee Speice
2018-09-02 22:32:19 -04:00
parent 724eb53d3c
commit c69833f253
4 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
# WebAssembly to asm.js
This directory is an example of using [binaryen]'s `wasm2asm` tool to convert
This directory is an example of using [binaryen]'s `wasm2js` tool to convert
the wasm output of `wasm-bindgen` to a normal JS file that can be executed like
asm.js.
@ -14,9 +14,9 @@ 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 `wasm2asm` tool internally.
is done by [binaryen]'s `wasm2js` tool internally.
Note that the `wasm2asm` tool is still pretty early days so there's likely to be
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

@ -6,17 +6,17 @@ set -ex
cargo +nightly build --target wasm32-unknown-unknown --release
# Run wasm-bindgen, and note that the `--no-demangle` argument is here is
# important for compatibility with wasm2asm!
# important for compatibility with wasm2js!
cargo +nightly run --manifest-path ../../crates/cli/Cargo.toml \
--bin wasm-bindgen -- \
--no-demangle \
../../target/wasm32-unknown-unknown/release/asmjs.wasm --out-dir .
# Run the `wasm2es6js` primarily with the `--wasm2asm` flag, which will
# internally execute `wasm2asm` as necessary
# 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 --wasm2asm -o asmjs_bg.js
asmjs_bg.wasm --wasm2js -o asmjs_bg.js
# Move our original wasm out of the way to avoid cofusing Webpack.
mv asmjs_bg.wasm asmjs_bg.bak.wasm