1
0
mirror of https://github.com/fluencelabs/aquavm synced 2025-03-16 04:50:49 +00:00
aquavm/npm/build_wasm.sh
Pavel 0ddc44bf52
Npm package ()
This commit migrates wasm wrapper from JS SDK into the air interpreter package.

Changes include:

* Adding directory for npm package
* Setting up typescript build pipeline
* Renaming package to air-interpreter
* Fixing CI pipelines to support the new build process
* Fixing issue with memory access violation in wasm wrapper
2021-05-05 15:43:50 +03:00

17 lines
338 B
Bash
Executable File

#!/bin/sh
## requires wasm-pack
## > curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
(
cd ..
mkdir -p ./npm/wasm
wasm-pack build ./interpreter --no-typescript --release -d ../npm/wasm
)
cat << EOF > ./src/wasm.js
// auto-generated
module.exports = "$(base64 -w0 wasm/aquamarine_client_bg.wasm)";
EOF