openethereum/js/wasm/ethkey/build.sh
Jaco Greeff 7bbd48a2bd Merge branch 'master' into ui-2
# Conflicts:
#	js/package.json
#	js/src/api/local/ethkey/worker.js
#	js/src/modals/FirstRun/TnC/tnc.js
#	js/src/modals/FirstRun/Welcome/welcome.js
#	js/src/ui/Form/Input/input.js
#	js/src/ui/VaultCard/Accounts/accounts.spec.js
#	js/src/views/Accounts/accounts.js
#	js/src/views/Application/TabBar/tabBar.js
#	js/src/views/Settings/Views/defaults.js
#	js/src/views/Settings/Views/views.js
#	js/webpack/app.js
#	js/webpack/libraries.js
2017-06-13 11:02:38 +02:00

17 lines
589 B
Bash
Executable File

# Remove previous build to avoid name conflicts
rm -rf target/wasm32-unknown-emscripten/*
# Build using nightly rustc + emscripten
rustup run nightly cargo build --release --target=wasm32-unknown-emscripten
# Copy final WASM file over
cp ./target/wasm32-unknown-emscripten/release/deps/parity_ethkey_wasm-*.wasm ./ethkey.wasm
# Create a Base64-encoded JS version of the wasm file for easy inclusion in Webpack
node base64ify
# Copy Base64-encoded JS version to src
cp ./ethkey.wasm.js ../../src/api/local/ethkey/ethkey.wasm.js
# rm -f ./ethkey.wasm ./ethkey.opt.wasm ./ethkey.wasm.js