Closed lilothar closed 5 months ago
I am afraid I do not understand the question completely.
If you want to use C/C++ FFI from Codon, you will need to expose the C/C++ functions via extern C
interface and avoid C++-specific objects in signatures (such as vector
).
If you thought of something else, please let me know.
yes , I known the method extern C
, but it is complete not esay to expose too many apis, I wander if there is simple way to expose as pybind11 to expose a c++ class
I wander that if I have implement a tensor compute library, as a example, expose a interface like 'l2_norm(const std::vector &v)`, how can I add it to the codon stdlib for a extension, and call it via python, finally, generate code or library call the interface?