wasm-bindgen/examples/wasm2js/build.sh
Alex Crichton cfa4aa0e3e Promote CI jobs to using stable Rust
Everything should be stable now so let's test it!
2018-10-28 13:28:02 -07:00

19 lines
493 B
Bash
Executable File

#!/bin/sh
set -ex
# Compile our wasm module and run `wasm-bindgen`
cargo build --target wasm32-unknown-unknown --release
cargo run --manifest-path ../../crates/cli/Cargo.toml \
--bin wasm-bindgen -- \
../../target/wasm32-unknown-unknown/release/wasm2js.wasm --out-dir .
# Run the `wasm2js` tool from `binaryen`
wasm2js wasm2js_bg.wasm -o wasm2js_bg.js
# Move our original wasm out of the way to avoid cofusing Webpack.
mv wasm2js_bg.wasm wasm2js_bg.bak.wasm
npm install
npm run serve