4 ms·
offtopic I am curious anyone tried using micropython to replace CPython o x86 servers?
by est 1y ago
offtopic I am curious anyone tried using micropython to replace CPython o x86 servers?
- analog31 1y agoI've not used MicroPython, but its fork, CircuitPython. My impression is that it's essentially a Python that doesn't interact with an operating system. Thus if there's a reason for a server to have an OS and interact with it, the regular Python would be preferable. I also don't know how much of the more advanced optimizations of Python are built into MicroPython. There's always a dilemma between making it performant, and making it micro.
- matt_trentini 1y agoYes, although MicroPython is focused on running on microcontrollers it can be useful if you want to reduce memory consumption, flash space and even startup time on servers. The challenge is that MicroPython has many fewer standard libraries: https://github.com/micropython/micropython/wiki/Standard-Library-Coverage https://github.com/micropython/micropython/wiki/Standard-Lib... And so many Python libraries targeting CPython won't work out-of-the box and you'll need to modify them or use alternatives that do work on the MicroPython subset.
- jononor 1y agoOnly really feasible if your program does not have any CPython C module dependencies. As there is no API compatibility with those.