mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-21 16:51:33 +00:00
Remove --wasm2js flag entirely
This commit is contained in:
@ -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!
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user