| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,19 +2,33 @@ Python compilation scripts and patches to run in the browser. | |||
| 2 | 2 | ||
| 3 | 3 | <https://www.beuc.net/python-emscripten/python> | |
| 4 | 4 | ||
| 5 | - Usage: | ||
| 5 | + Build requirements: Emscripten, gcc, make, quilt | ||
| 6 | 6 | ||
| 7 | - `cd 3.8/` | ||
| 8 | - `./python.sh` | ||
| 9 | - `./package-pythonhome.sh repr.py base64.py ...` | ||
| 10 | - `emcc ... -lpython3.8 -s EMULATE_FUNCTION_POINTER_CASTS=1` | ||
| 7 | + Emscripten: download prebuilt binaries (or [build from source](https://emscripten.org/docs/building_from_source/)) | ||
| 11 | 8 | ||
| 12 | - See for instance [RenPyWeb](https://github.com/renpy/renpyweb). | ||
| 9 | + git clone https://github.com/emscripten-core/emsdk/ | ||
| 10 | + pushd emsdk/ | ||
| 11 | + ./emsdk install 1.39.18 | ||
| 12 | + ./emsdk activate 1.39.18 | ||
| 13 | + popd | ||
| 14 | + source emsdk/emsdk_env.sh | ||
| 15 | + | ||
| 16 | + Python for the web browser! | ||
| 17 | + | ||
| 18 | + cd 3.8/ | ||
| 19 | + ./python.sh | ||
| 20 | + ./package-pythonhome.sh repr.py base64.py ... | ||
| 21 | + emcc ... -lpython3.8 -s EMULATE_FUNCTION_POINTER_CASTS=1 | ||
| 13 | 22 | ||
| 14 | 23 | Web demo: <https://www.beuc.net/python-emscripten/demo/> | |
| 15 | 24 | ||
| 16 | - Emscripten evolves regularly with breaking changes. | ||
| 17 | - Last tested with Emscripten 1.39.18. | ||
| 25 | + ./webprompt.sh | ||
| 26 | + emrun --serve_after_close t/index.html | ||
| 27 | + | ||
| 28 | + Real-world showcase: [RenPyWeb](https://github.com/renpy/renpyweb). | ||
| 29 | + | ||
| 30 | + Emscripten evolves regularly with (minor) breaking changes. | ||
| 31 | + If you use a different version compilation may break. | ||
| 18 | 32 | ||
| 19 | 33 | Mirrors: | |
| 20 | 34 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments