4 ms·
8.6 MB - wow! There must be way more in there than just running Python code. I once implemented a small subset of PHP in PHP (just enough to run the code I wa
by mg 11mo ago
8.6 MB - wow!
There must be way more in there than just running Python code.
I once implemented a small subset of PHP in PHP (just enough to run the code I wanted it to run) and it took me 320 lines of code. The file (gloriously named php.php) was less than 10k in size.
Still, loading 8.7 MB is kinda ok. It takes about 2s on my pretty normal home connection.
Indeed, https://pyodide.org/en/stable/console.html https://pyodide.org/en/stable/console.html loads a wasm that is 8.7 MB.
It also loads "python_stdlib.zip" which is 2.42 MB. Maybe that is the whole standard lib in compressed form? I wonder why they publish a zip. Browsers natively support all kinds of nice compression.
I guess there are leaner implementations than CPython?
https://pyscript.net https://pyscript.net loads a file "mircopython.wasm" that is 434 KB.