Spike Wayland compositor, hybrid MoonBit WM, SSD decorations, and wasmtime native host

This commit is contained in:
Antigravity committed 2026-11-25 00:42:01 +00:00
1 parent 880ecd4102
commit 17a8a46cfd
56 files changed
+8924 -11

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Build WM and decoration MoonBit components from wit/wm/.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"; cd "$ROOT"
export PATH="$ROOT/.tools/bin:$HOME/.moon/bin:$PATH"
wasm-tools component wit wit/wm >/dev/null
moon build --target wasm --release 2>&1 | grep -v -E 'Warning|^\s*$|[│╭╰─]' || true
[ "${PIPESTATUS[0]}" -eq 0 ] || { echo "error: moon build failed" >&2; exit 1; }
mkdir -p build/components
for pair in "wm-hybrid:window-manager" "decoration-breeze:decoration-provider"; do
name="${pair%%:*}"
world="${pair#*:}"
core="_build/wasm/release/build/components/$name/gen/gen.wasm"
[ -f "$core" ] || { echo "error: $core missing" >&2; exit 1; }
out="build/components/$name.wasm"
wasm-tools component embed wit/wm "$core" --world "$world" --encoding utf16 -o "build/components/$name.embed.wasm"
wasm-tools component new "build/components/$name.embed.wasm" -o "$out"
rm -f "build/components/$name.embed.wasm"
wasm-tools validate --features component-model "$out"
wasm-tools component targets --world "$world" wit/wm "$out" >/dev/null
printf ' %-18s %-20s %7s bytes\n' "$name" "$world" "$(stat -c %s "$out")"
done
echo "ok (wm)"