Just curious, has anyone used/compared the “excellent” pybind11 (that supports at least C++17, not sure with C++20) and Julia with Cxx.jl and/or Cppwrap.jl?
Note, Pybind11 has a benchmark section in their extensive docs.
I’ve not used any of this (yet). I just find the Cxx.jl C++ REPL integration cool (not sure other languages have anything yet as good).
Is there a reason to prefer Python or other languages with C++ over Julia (with C++ or alone…) because of better C++ interop (e.g. for performance or other, e.g. docs reasons)? I know at least C interop is superior in Julia to SWIG. I suppose you can call Python (with PyCall) and then to C++, but not really needed/wanted.
What comes to mind, brand new in C++20, is (finally) modules:
Not sure about support from other languages (or if needed).
There’s no need to explain Cxx.jl vs. Cppwrap.jl (but feel free to point to what best option for Python maps to each, CppWrap maps to Boost; and I think pybind11, didn’t look carefully).
EDIT:
I know both support Julia 1.0 (and 1.2?) and Cxx has had updates since I last looked at it (while still having open Windows issues, unlike CxxWrap, as if I recall it wouldn’t need special support; both should work well on Linux).
I did see this “Move GC protect code to JuliaSee PR” recentlly merged for CppWrap; one potential issue is Julia’s GC (needing support, with Julia evolving; different from Python’s reference counting).
I don’t know anything to be wrong with CxxWrap, seems very nice; neither have as extensive docs or benchmark section as far as I recall. Note, however there’s:
https://juliacomputing.com/blog/2017/12/01/cxx-and-cxxwrap-intro.html
and I also found: https://tianjun.me/static/essay_resources/A_Guide_to_Wrap_a_C++_Library_with_CXXWrap.jl_and_BinaryBuilder.jl_in_Julia/main.html https://cppnow2018.sched.com/event/EC7F/the-julia-language-and-c-the-perfect-marriage
and there are some recent discussions here, e.g menioning one minor TODO for CppWrap: