indygreg / python-build-standalone

Produce redistributable builds of Python
BSD 3-Clause "New" or "Revised" License
1.75k stars 109 forks source link

Support Web Assembly target #70

Open polkovnikov opened 3 years ago

polkovnikov commented 3 years ago

As it is said in StackOverflow post it is possible to compile Python for websites (browser) using Web Assembly technology.

Would be great if you also support later Web Assembly target compilations. So that your Python will be used directly from browser. Just add python.js script to HTML webpage and now you can call Python C API functions directly from JavaScript. Of cause one of main function to use will be PyRun_SimpleString(code) to just run piece of Python code.

As it is known running Web Assembly is usually almost as fast as running regular EXE binary. So if you support this technology then Python scripts can be run in browser almost as fast as from regular command line interpreter.