diff --git a/scripts/build-modules.sh b/scripts/build-modules.sh index 76b7ec8..6d6e2e5 100755 --- a/scripts/build-modules.sh +++ b/scripts/build-modules.sh @@ -20,7 +20,11 @@ while read -r name world; do case "$world" in *-widget) ;; *) continue;; esac if [ ${#want[@]} -gt 0 ] && [[ ! " ${want[*]} " =~ " $name " ]]; then continue; fi core="_build/wasm/release/build/components/$name/gen/gen.wasm" - [ -f "$core" ] || { echo "error: $core missing" >&2; exit 1; } + if [ ! -f "$core" ]; then + # Listed in components.txt but its source isn't in the tree (yet): skip it, don't fail the build. + echo " $name: skipped (no source: $core missing)" >&2 + continue + fi out="build/components/$name.wasm" wasm-tools component embed wit "$core" --world "$world" --encoding utf16 -o "build/components/$name.embed.wasm" wasm-tools component new "build/components/$name.embed.wasm" -o "$out"