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
Sign in with GitHub to download. Each download is recorded with your GitHub username.
| 1 | #! |
| 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. |
| 5 | set -euo pipefail |
| 6 | here="$(cd "$(dirname "$0")/.." && pwd)" |
| 7 | build="$here/build/wasm" |
| 8 | if ! 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 |
| 11 | fi |
| 12 | emcmake cmake -S "$here" -B "$build" -DCMAKE_BUILD_TYPE=Release |
| 13 | cmake --build "$build" --parallel |
| 14 | node "$here/scripts/assemble.mjs" "$build" |