Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ build_wasm:
.PHONY: build_wasm

serve_wasm:
cd web && python3 -m http.server 8080 --bind 0.0.0.0
cd docs && python3 -m http.server 8080 --bind 0.0.0.0
.PHONY: serve_wasm
10 changes: 5 additions & 5 deletions build_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ if [ ! -f pocketpy/src/common/_generated.c ]; then
fi

# Create output directory
rm -rf web/lib
mkdir -p web/lib
rm -rf docs/lib
mkdir -p docs/lib

# Generate test_numpy.js from test source
python3 -c "
import json
with open('tests/test_numpy.py') as f:
src = f.read()
print('var TEST_SOURCE = ' + json.dumps(src) + ';')
" > web/test_numpy.js
" > docs/test_numpy.js

# Common flags
DEFINES="-DPK_ENABLE_OS=0 -DPK_ENABLE_THREADS=0 -DPK_ENABLE_DETERMINISM=0 \
Expand Down Expand Up @@ -51,8 +51,8 @@ em++ "$TMPDIR/pocketpy.o" \
-sALLOW_MEMORY_GROWTH=1 \
-sSTACK_SIZE=1048576 \
$WARNINGS \
-o web/lib/pocketpy.js
-o docs/lib/pocketpy.js

rm -rf "$TMPDIR"

echo "Build complete: web/lib/pocketpy.js, web/lib/pocketpy.wasm"
echo "Build complete: docs/lib/pocketpy.js, docs/lib/pocketpy.wasm"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading