2021-07-28 13:53:38 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -o errexit -o nounset -o pipefail
|
|
|
|
|
|
|
|
# set current working directory to script directory to run script from everywhere
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
2022-02-24 16:37:58 +03:00
|
|
|
# build registry.wasm
|
2021-07-28 13:53:38 +03:00
|
|
|
marine build --release
|
|
|
|
|
|
|
|
# copy .wasm to artifacts
|
|
|
|
rm -f artifacts/*
|
|
|
|
mkdir -p artifacts
|
2022-02-24 16:37:58 +03:00
|
|
|
cp target/wasm32-wasi/release/registry.wasm artifacts/
|
2021-07-28 13:53:38 +03:00
|
|
|
|
|
|
|
# download SQLite 3 to use in tests
|
2023-12-27 00:30:24 +03:00
|
|
|
curl -L https://github.com/fluencelabs/sqlite/releases/download/sqlite-wasm-v0.18.2/sqlite3.wasm -o artifacts/sqlite3.wasm
|
2021-07-28 13:53:38 +03:00
|
|
|
|
|
|
|
# generate Aqua bindings
|
2022-04-11 16:24:51 +04:00
|
|
|
marine aqua artifacts/registry.wasm -s Registry -i registry >../aqua/registry-service.aqua
|
2023-06-13 18:00:48 +02:00
|
|
|
|
|
|
|
mkdir -p ../distro/registry-service
|
|
|
|
cp artifacts/registry.wasm artifacts/sqlite3.wasm ../distro/registry-service
|