Viewing is open to everyone. Downloading and starring need a GitHub sign-in. Sign in with GitHub

build.sh

v0.1.0-build.85 Latest Commit ede38f5

Size
649 B
Lines
14
Language
shellscript
SHA-256
11691e204a9a…
View on GitHub

Sign in with GitHub to download. Each download is recorded with your GitHub username.

1#!/usr/bin/env bash
2# Builds the CKey Web SDK into dist/: the core + bridge compiled with
3# Emscripten (emcmake/em++ must be on PATH, e.g. after `source emsdk_env.sh`),
4# then the JS wrapper and TypeScript declarations copied next to it.
5set -euo pipefail
6here="$(cd "$(dirname "$0")/.." && pwd)"
7build="$here/build/wasm"
8if ! command -v emcmake >/dev/null 2>&1; then
9 echo "error: emcmake not found. Install and activate emsdk (https://emscripten.org/docs/getting_started/downloads.html)." >&2
10 exit 1
11fi
12emcmake cmake -S "$here" -B "$build" -DCMAKE_BUILD_TYPE=Release
13cmake --build "$build" --parallel
14node "$here/scripts/assemble.mjs" "$build"