Skip to content

Commit 9d4430b

Browse files
Qardclaude
andcommitted
Handle WASM binary without .wasm extension
WASM binaries from cargo may not have .wasm extension. Try both extensions and copy the binary file as .wasm if needed. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6fcff6b commit 9d4430b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/CI.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,18 @@ jobs:
170170
ls -la target/wasm32-wasip1/ 2>/dev/null || echo "No wasm32-wasip1 directory"
171171
ls -la target/wasm32-wasip1/release/ 2>/dev/null || echo "No release directory"
172172
echo "===== Copying WASM to root ====="
173-
cp target/wasm32-wasip1/release/fix-python-soname.wasm .. || {
174-
echo "ERROR: Failed to copy WASM file"
175-
ls -la target/wasm32-wasip1/release/
173+
# WASM binaries might not have .wasm extension, try both
174+
if [ -f "target/wasm32-wasip1/release/fix-python-soname.wasm" ]; then
175+
cp target/wasm32-wasip1/release/fix-python-soname.wasm ..
176+
echo "Copied .wasm file"
177+
elif [ -f "target/wasm32-wasip1/release/fix-python-soname" ]; then
178+
cp target/wasm32-wasip1/release/fix-python-soname ../fix-python-soname.wasm
179+
echo "Copied binary file as .wasm"
180+
else
181+
echo "ERROR: No WASM or binary file found"
182+
ls -la target/wasm32-wasip1/release/ 2>/dev/null || echo "No release directory"
176183
exit 1
177-
}
184+
fi
178185
cd ..
179186
echo "===== Verifying WASM file in root ====="
180187
pwd

0 commit comments

Comments
 (0)