Closed jedie closed 5 years ago
it loads instantly the whole test folder is 1.8MiB with all modules listed in screenshot no way pypy or cpython can beat micropython on loading speeds
added static test page http://pmpp.pagesperso-orange.fr/micropython/
.
├── favicon.ico
├── js
│ ├── __init__.py
│ └── __main__.py
├── micropython.data
├── micropython.html
├── micropython.js
├── micropython.wasm
├── pythons.js
└── test.html
1 directory, 9 files
1,8M .
That sounds pretty good... Meanwhile many JavaScript frameworks have become bigger...
Please look at: https://github.com/pypyjs/pypyjs-examples
Is everything already there so that you can create the examples with "micropython-ports-wasm" ?
btw. the name "micropython-ports-wasm" is a little long ;)
no you need to checkout micropython-master , because micropython-ports-wasm
matches micropython/ports/wasm
folder, that's not a standalone micropython , micropython hosts his targets in its "ports" folder and the makefile commands are relative to the parent folders.
about examples, i just don't know yet what that port is capable of. Feel free to try :)
I think you start a seperate github repro and push a compiled version there. The idea is to include this "release-repro" as git submodule. So it's easy to start a webpage without the need to compile...
That's what we did with PyPy.js see git submodules here: https://github.com/pypyjs/pypyjs-examples So i can just include the needed files, see: https://github.com/pypyjs/pypyjs-examples/blob/gh-pages/mandelbrot.html#L37-L39
Maybe later when dom and c/c++ modules dynamic linking is in, there are still bugs in micropython master ( unrelated to the numerous ones in this port ) and i have an intermediate patching stage to establish to fully support asyncio.
This port is an early experiment with no licensing, do not expect anything stable for weeks even if it looks ok. i'm also waiting for @brion and his libffi basic support https://github.com/brion/libffi/tree/emscripten-work
maybe ask for compiled version here https://github.com/micropython/micropython/tree/master/ports/javascript . As i won't release until uasyncio/dom and the bridge sockets->websockets are really tested.
I'm came from: https://github.com/micropython/micropython/issues/888
PyPy.js had the problem that it is simply too big: The loading times are simply too long for practical use. See: https://github.com/pypyjs/pypyjs/issues/196
What's the requestes size here for a complete loaded python interpreter?