I moved the web example from Tools/wasm into Tools/wasm/emscripten/web_example. I also added a new target build_emscripten which is build_wasm but also builds the web_example. The web_example needs:
python.html, copied
python.worker.mjs copied
python.mjs and python.wasm output from the main linking of the Python interpreter
The webserver that sets COOP and COEP
python3.14.zip
This last is created by the wasm_assets.py script, which required a pretty small set of changes to work fine for us.
The last thing that should be done is the python.worker.mjs script should be made independent of the Python version: currently 3.14 is hard coded. I ran into trouble doing this, so maybe I can leave it to a followup.
I moved the web example from
Tools/wasm
intoTools/wasm/emscripten/web_example
. I also added a new targetbuild_emscripten
which isbuild_wasm
but also builds the web_example. The web_example needs:This last is created by the
wasm_assets.py
script, which required a pretty small set of changes to work fine for us.The last thing that should be done is the
python.worker.mjs
script should be made independent of the Python version: currently 3.14 is hard coded. I ran into trouble doing this, so maybe I can leave it to a followup.