2021-11-12 13:19:16 +00:00
|
|
|
#!/usr/bin/env bash
|
2024-01-17 11:04:55 +00:00
|
|
|
|
2021-11-12 13:19:16 +00:00
|
|
|
set -o errexit -o nounset -o pipefail
|
2024-01-17 11:04:55 +00:00
|
|
|
set -x
|
2021-11-12 13:19:16 +00:00
|
|
|
|
|
|
|
# set current working directory to script directory to run script from everywhere
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
|
|
|
# build trust-graph.wasm
|
|
|
|
marine build --release
|
|
|
|
|
|
|
|
# copy .wasm to artifacts
|
|
|
|
rm -f artifacts/*
|
|
|
|
mkdir -p artifacts
|
|
|
|
cp ../target/wasm32-wasi/release/trust-graph.wasm artifacts/
|
|
|
|
|
|
|
|
# download SQLite 3 to use in tests
|
2023-12-26 21:30:36 +00:00
|
|
|
curl -sS -L https://github.com/fluencelabs/sqlite/releases/download/sqlite-wasm-v0.18.2/sqlite3.wasm -o artifacts/sqlite3.wasm
|
2021-11-12 13:19:16 +00:00
|
|
|
|
2023-01-30 10:42:12 +00:00
|
|
|
# generate Aqua bindings
|
|
|
|
marine aqua artifacts/trust-graph.wasm -s TrustGraph -i trust-graph > ../aqua/trust-graph.aqua
|