2018-04-30 23:22:46 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
2018-09-21 02:20:42 +03:00
|
|
|
# Compile our wasm module and run `wasm-bindgen`
|
2018-04-30 23:22:46 +03:00
|
|
|
cargo +nightly build --target wasm32-unknown-unknown --release
|
|
|
|
cargo +nightly run --manifest-path ../../crates/cli/Cargo.toml \
|
|
|
|
--bin wasm-bindgen -- \
|
2018-09-21 02:20:42 +03:00
|
|
|
../../target/wasm32-unknown-unknown/release/wasm2js.wasm --out-dir .
|
2018-04-30 23:22:46 +03:00
|
|
|
|
2018-09-03 20:56:55 +03:00
|
|
|
# Run the `wasm2js` tool from `binaryen`
|
2018-09-21 02:20:42 +03:00
|
|
|
wasm2js wasm2js_bg.wasm -o wasm2js_bg.js
|
2018-04-30 23:22:46 +03:00
|
|
|
|
|
|
|
# Move our original wasm out of the way to avoid cofusing Webpack.
|
2018-09-21 02:20:42 +03:00
|
|
|
mv wasm2js_bg.wasm wasm2js_bg.bak.wasm
|
2018-04-30 23:22:46 +03:00
|
|
|
|
|
|
|
npm install
|
|
|
|
npm run serve
|