summaryrefslogtreecommitdiff
path: root/crates/gipfel-desktop/build-frontend.sh
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-11-10 09:12:35 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-11-10 09:12:35 +0100
commit0b0663e0c9dc664f35ffead3b395ffd2009fd98c (patch)
treef9e10437ebe7e13e527ce1a6a2b456c105bcc5c0 /crates/gipfel-desktop/build-frontend.sh
parent02546370ec4458eef59a8f636fe05b57961d56ab (diff)
parent31a47fc4393856a0a0380b2fdcf79f9dac72ad56 (diff)
Merge branch 'wasm-spike'
# Conflicts: # crates/gipfel-core/src/metadata.rs
Diffstat (limited to 'crates/gipfel-desktop/build-frontend.sh')
-rwxr-xr-xcrates/gipfel-desktop/build-frontend.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/gipfel-desktop/build-frontend.sh b/crates/gipfel-desktop/build-frontend.sh
new file mode 100755
index 0000000..72a1687
--- /dev/null
+++ b/crates/gipfel-desktop/build-frontend.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Build the gipfel WASM front end into dist/ for tauri to bundle.
+# Runs from crates/gipfel-desktop (tauri beforeBuildCommand).
+set -e
+HERE="$(cd "$(dirname "$0")" && pwd)"
+DIST="$HERE/dist"
+mkdir -p "$DIST"
+cd "$HERE/../.."
+cargo build -p gipfel --target wasm32-unknown-unknown --release
+wasm-bindgen --target web --out-dir "$DIST" \
+ target/wasm32-unknown-unknown/release/gipfel.wasm
+cp crates/gipfel/www/index.html crates/gipfel/www/style.css \
+ crates/gipfel/www/loader.js "$DIST/"
+gzip -9 -n -c gipfel.dat > "$DIST/gipfel.dat.gz"
+echo "frontend dist ready: $DIST"