# Build + serve the SQLRite WASM browser demo.
#
# Targets:
# make build — build the wasm-pack output into ./pkg/
# make serve — serve the demo on http://localhost:8080
# make — build + serve
# make clean — remove the built pkg/
:
PORT ?=
:
# Point at the sdk/wasm crate via a relative path. `wasm-pack build
# --out-dir` writes the generated JS + wasm + .d.ts files straight
# into `examples/wasm/pkg/`, which `index.html` imports directly.
:
# Simple static server so the browser can fetch the wasm file via
# HTTP (file:// loads block WebAssembly for security reasons). Uses
# Python because it's on every macOS/Linux install; any static
# server works (miniserve, `npx serve`, etc.).
:
: