86 points · by syrusakbary · 2y ago · 39 comments
esp32 and stm32 run three different native assembly instruction sets (though this only supports two of them, the others listed in the first line of the readme are all arm)
the coremark results seem like an adequate answer to why you'd use a compiler rather than an interpreter
i do think it would be clearer, though, to explain up front that the module being built is not made of python code, but rather callable from python code
WASM is an almost "ideal" bytecode target for embedded AOT native compilation as well, though yeah, you'd have to implement all of the backend targets.
I know nothing about micropython. Do the modules contain 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.
That makes me feel the end goal here is not what's described ("make wasm so it can run on a raspberry"), but rather "make wasm run in micropython".
Am I missing something?
https://github.com/wasm3/wasm3? https://github.com/espressif/esp-wasmachine ? https://github.com/bytecodealliance/wasm-micro-runtime/tree/... ? https://github.com/TOPLLab/WARDuino ?
It obviously depends on your needs/goals.
P.S. I'm also the author of wasm3
In that case which approach / library would you recommend to embedd a WASM VM?
Is it in terms of maturity? Speed? Memory footprint? Safety?
These .mpy files are dynamically loaded into MicroPython using a regular python import.