JuliaCon 2020 (times are in UTC)

Julia and C++: a technical overview of CxxWrap.jl
07-30, 16:10–16:40 (UTC), Red Track

CxxWrap.jl simplifies the creation of Julia packages that rely on C++ libraries for part of their functionality. Unlike Cxx.jl, the focus is on writing the wrapper code in C++, compiling it into a small shared library, inspired by the approach of Boost.Python for Python.


Since the previous presentation in 2016, the package has evolved quite a bit, so after a brief recap of the basic functionality the talk will focus on some of the new design choices and their implementation, which will hopefully clarify some aspects that are not easy to convey in documentation.

We will start with a short introduction, showing the basic principle of using ccall on a C++ function pointer to make calling any kind of C++ function possible. From there, we will explain the mapping of argument and return types, especially focusing on the recent changes for integer number types. Since CxxWrap v0.9 there is also a much more rigorous treatment of pointers, references and values, which all have a distinct type now. We will explain some of the design choices behind these new types, as well as the new @cxxdereference macro that simplifies writing Julia functions acting on CxxWrap-generated types.

We end the presentation with a discussion of the new C++ standard library functionality and show how to extend this for as yet unsupported container types.

Slides are available at https://barche.github.io/juliacon2020-cxxwrap-talk/

Bart Janssens is a military associate professor at the mechanics department of the Royal Military Academy, with a passion for computer graphics, high performance computing and fluid mechanics. For performance reasons, he used C++ until being introduced to Julia. His current work focuses on making scientific C++ libraries such as Trilinos interoperate with Julia, with the ultimate objective of developing CFD code for Julia.

This speaker also appears in: