完成Web ASM

This commit is contained in:
Misaki
2026-06-08 22:09:35 +08:00
parent e565b80bc2
commit 36660519c1
28 changed files with 1148 additions and 178 deletions
Executable
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -e
VERSION=1.8.0
echo "=== Building ncmdump WASM ==="
GOOS=js GOARCH=wasm go build -o web/public/ncmdump.wasm ./cmd/wasm
echo "=== Copying wasm_exec.js ==="
cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" web/public/
echo "=== Building frontend ==="
cd web
npm install
npm run build
cd ..
echo "=== Building server ==="
CGO_ENABLED=0 go build -ldflags="-w -s" -o ncmdump-web ./cmd/server
echo "=== Done ==="
echo "Run: ./ncmdump-web --port 8080"