Can this library be used together with MicroPython? #2662
-
Reference: https://github.com/micropython/micropython I have some Rust logic I would like to re-use in MicroPython. Can this library be used to bridge the two languages/runtimes? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I have not checked in detail but I would be surprised if it works as-is. PyO3 relies on the C API provided by CPython and PyPy and would need to be adjusted to be able to make use of MicroPython's native API. But IIRC, MicroPython makes some fundamental deviations from CPython in how it implements Python's data model and this might be even more fundamentally incompatible with how PyO3 works then just adjusting to a different native API. |
Beta Was this translation helpful? Give feedback.
I have not checked in detail but I would be surprised if it works as-is. PyO3 relies on the C API provided by CPython and PyPy and would need to be adjusted to be able to make use of MicroPython's native API. But IIRC, MicroPython makes some fundamental deviations from CPython in how it implements Python's data model and this might be even more fundamentally incompatible with how PyO3 works then just adjusting to a different native API.