4 ms·
I’ve done a lot of interfacing with C and C++. pybind11 [0] has been the easiest and most effective for me to use. It targets C++, but it’s easy enough to wrap
by stochastic_monk 8y ago
I’ve done a lot of interfacing with C and C++. pybind11 [0] has been the easiest and most effective for me to use. It targets C++, but it’s easy enough to wrap C code with it. Cython brings along a lot more bookkeeping code and overhead in my experience. cffi isn’t bad, but it’s not as flexible/expressive.
[0] https://github.com/pybind/pybind11 https://github.com/pybind/pybind11
- filmor 8y agoCFFI has the huge advantage that you don't need to link against libpython, which in turn allows you to have a single wheel for multiple Python versions.