thorvg/wasm_webgpu_build.sh
Jinny You dca095b3c1 wasm/infra: Add build scripts for WebGPU
New build script for WASM with WebGPU.

Run `wasm_webgpu_build.sh` to have WebGPU WASM binary
2024-09-30 16:44:21 +09:00

11 lines
463 B
Bash
Executable file

#!/bin/bash
#https://github.com/thorvg/thorvg/wiki/WebGPU-Raster-Engine-Development
if [ ! -d "./build_wasm" ]; then
sed "s|EMSDK:|$1|g" ./cross/wasm_webgpu.txt > /tmp/.wasm_cross.txt
meson -Db_lto=true -Ddefault_library=static -Dstatic=true -Dloaders="all" -Dsavers="all" -Dthreads=false -Dbindings="wasm_beta" -Dengines="wg_beta" --cross-file /tmp/.wasm_cross.txt build_wasm
fi
ninja -C build_wasm/
ls -lrt build_wasm/src/bindings/wasm/thorvg-wasm.*