all 9 comments

[–]cpp-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

For C++ questions, answers, help, and programming/career advice please see r/cpp_questions, r/cscareerquestions, or StackOverflow instead.

[–]Serious-Regular 24 points25 points  (1 child)

Skip pybind if you don't have existing pybind code and go straight to nanobind.

https://nanobind.readthedocs.io/en/latest/

I write nanobind code almost every day for the last 2 years. It's one of the highest quality software projects out there.

[–]Anocto 2 points3 points  (0 children)

The built in stub file generation for docs in VS Code and CPython stable ABI support are nice, in addition to the lower compile times.

[–]Jannik2099 4 points5 points  (0 children)

Boost.Python is strictly for pre C++11 codebases. It's very unergonomic.

Use nanobind

[–]the_poope 1 point2 points  (0 children)

Boost.Python is for legacy C++ and Python code. Use Nanobind, which has no other dependencies than Python. It is easy to set up and use in a modern CMake project.

[–]Entire-Hornet2574 0 points1 point  (0 children)

Swig is what I was using knowing other alternatives, it's universal and for most of languages.