4 ms·
tools/mpy_ld.py: https://github.com/micropython/micropython/blob/master/tools/mpy_ld.py https://github.com/micropython/micropython/blob/master/tools... tools/m
by westurner 2y ago
tools/mpy_ld.py: https://github.com/micropython/micropython/blob/master/tools/mpy_ld.py https://github.com/micropython/micropython/blob/master/tools...
tools/mpy-tool.py lists opcodes: https://github.com/micropython/micropython/blob/master/tools/mpy-tool.py https://github.com/micropython/micropython/blob/master/tools...
Can the same be done with .pyc files; what are the advantages of MicroPython native modules?
Why does it need wasm2c?
- vshymanskyy 2y agoI don't think .pyc files can contain native code, but .mpy can! And that's exactly what I'm using here: - compile any language to wasm - translate wasm to C99 - use the native target toolchain to compile C99 to .mpy - run that on the device
- westurner 2y agoIf they're both Turing-complete opcodes instruction sets, Church-Turing says it is possible with just .pyc, too. But that doesn't solve for WASM on a MicroPython device. And that is why smart contracts without costed opcodes could not be built on Python.