Hacker News new | ask | show | jobs
by bwasti 2207 days ago
would a library like pybind (for C++ extensions) be compatible with the philosophy of this python implementation?
1 comments

I'm not sure. My interest is in "Python first" approach, after all, the whole idea of developing a small Python implementation (first MicroPython, then Pycopy) was to write code in Python, not C/C++. Where interfacing with existing libraries is required, the best way to do that is again from Python side, using FFI (https://pycopy.readthedocs.io/en/latest/library/ffi.html). That however usually means code written in C, as C has a simple and stable enough ABI to which it's easy to interface.

In other words, things like interfacing with C++ is somewhat outside of Pycopy scope. But they very well may be in the scope of MicroPython project (and if they're available for MicroPython, they should be also usable for Pycopy, as 2 projects are largely compatible.)