Swig – Connect C/C++ programs with high-level programming languages
1–10 of 90 posts
Re: Swig – Connect C/C++ programs with high-level programming languages
#2Re: Swig – Connect C/C++ programs with high-level programming languages
#3Then I had a pure python codebase that I could run on any python version without recompilation, and I no longer had the complication of having to deal with swig's different versions across different distribution releases.
For much bigger projects I could imagine that the situation can be different.
Re: Swig – Connect C/C++ programs with high-level programming languages
#4Re: Swig – Connect C/C++ programs with high-level programming languages
#5Fun times.
Re: Swig – Connect C/C++ programs with high-level programming languages
#6CLIF is way nicer for C++/Python. If you need other languages then best of luck (Zig, Rust and D are easier than Java and Go at least).
Re: Swig – Connect C/C++ programs with high-level programming languages
#7I got a great speedup using C++ with pybind11 for my Python backend, 30x if I remember correctly. It was for an app that detects wether words rhyme. I was about to release it but ditched it as soon as ChatGPT came out (it can find rhymes easily, and sometimes better).
Re: Swig – Connect C/C++ programs with high-level programming languages
#8In my personal experience, to use a very small C library in python in a work project, my life became simpler when I ditched swig and just called the C API from python. Then I had a pure python codebase that I could run on any python version without recompilation, and I no longer had the complication of having to deal with swig's different versions across different distribution releases. For much bigger projects I cou…
Re: Swig – Connect C/C++ programs with high-level programming languages
#9Re: Swig – Connect C/C++ programs with high-level programming languages
#10In my personal experience, to use a very small C library in python in a work project, my life became simpler when I ditched swig and just called the C API from python. Then I had a pure python codebase that I could run on any python version without recompilation, and I no longer had the complication of having to deal with swig's different versions across different distribution releases. For much bigger projects I cou…
How do you call C API from python? Through executable + stdin/stdout?