3 ms·
.mpy modules can contain MicroPython bytecode and/or native machine code. In this case, WASM is compiled (via C) to native code. So the performance is very good
by jononor 2y ago
.mpy modules can contain MicroPython bytecode and/or native machine code. In this case, WASM is compiled (via C) to native code. So the performance is very good, much better than interpreting either MicroPython bytecode or WASM bytecode.
The conventional way of creating native modules for MicroPython is to write them in C. This work allows to use any language that supports WASM output target.
- 01HNNWZ0MV43FF 2y agoOh, I didn't know MicroPython was fully AOT. I'm surprised, since vanilla Python is typically interpreted with maybe a bytecode cache, right?
- dbcurtis 2y agoIt isn’t fully AOT, but support for AOT modules is excellent.
- zorgmonkey 2y agoThanks for the explanation this project makes so much more sense now. If people want a little more detail, they have a brief how it works section in readme https://github.com/vshymanskyy/wasm2mpy?tab=readme-ov-file#how-it-works https://github.com/vshymanskyy/wasm2mpy?tab=readme-ov-file#h...