[1] https://github.com/pybind/pybind11 [2] https://github.com/fwilliams/numpyeigen
I had also higher expectation regarding Dart FFI - I think with their ffigen we are still only in ctypes like python bindings territory. Nowhere near something like pybind11 [0] for c++ bindings yet.
With https://github.com/pybind/pybind11 there is really great integration with C++ and Python is my second home after C++ actually.
Anyway, I am quite happy with Wren and it seems to be fast (not a requirement for my project, though)
Now I'm starting to use it as part of the Python memory profiler I'm working on (https://pythonspeed.com/fil), in this case to call in to the low-level Python C API which PyO3 includes bindings for in addition to its high-level API. This kind of usage is more like writing C, except with the benefit of having high-level APIs (for GIL holding, but also object conversion) available when I need it.
So basically you get safe, high-level, easy-to-use APIs, with fallback to low-level unsafe APIs if you need them.
Highly recommend trying it out.
Mitubsa 2 allows for essentially writing complex path tracing code once and automatically being able to generate a traditional CPU-based scalar path tracer, an NVIDIA RTX accelerated path tracer, a vectorized path tracer, and fully differentiable path tracer, etc. A lot of the underlying heavy lifting for this capability can be found in a separate library by the same authors [1].
You may be familiar with pybind11 [1]; this is from the same author and uses pybind11 extensively. A lot of people don't know that the author of pybind11 is actually one of the top rendering researchers in the world.
There's been an enormous amount of buzz about Mitsuba 2 in the rendering world since the paper [3] came out last year. I for one am pretty excited about diving into the code.
[1] https://github.com/mitsuba-renderer/enoki [2] https://github.com/pybind/pybind11 [3] https://dl.acm.org/doi/10.1145/3355089.3356498
[1] https://github.com/aldanor/ipybind [2] https://github.com/pybind/pybind11
For example, the binding of an accelerated HyperLogLog implementation only requires tiny amount of work, plus a line in my Makefile:
PYBIND11_MODULE(_hll, m) {
m.doc() = "pybind11-powered HyperLogLog"; // optional module docstring
py::class_ (m, "hll")
.def(py::init())
.def("clear", &hll_t::clear, "Clear all entries.")
.def("resize", &hll_t::resize, "Change old size to a new size.")
.def("sum", &hll_t::sum, "Add up results.")
.def("report", &hll_t::report, "Emit estimated cardinality. Performs sum if not performed, but sum must be recalculated if further entries are added.")
.def("add", &hll_t::add, "Add a (hashed) value to the sketch.")
.def("addh_", &hll_t::addh, "Hash an integer value and then add that to the sketch.");
}
[1] https://github.com/pybind/pybind11Disclaimer: I'm a contributor to pybind11.