pmp-p / micropython-ports-wasm

*experimental* wasm micropython port *not a fork* for Pythons Everywhere
http://pmp-p.github.io/layout.html
38 stars 1 forks source link

file sizes?!? #1

Closed jedie closed 5 years ago

jedie commented 5 years ago

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?

pmp-p commented 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

pmp-p commented 5 years ago

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    .
jedie commented 5 years ago

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 ;)

pmp-p commented 5 years ago

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 :)

jedie commented 5 years ago

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

pmp-p commented 5 years ago

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

pmp-p commented 5 years ago

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.