Generating Language Bindings using C++ Reflection

Callum Piper

⏱ 60 minute session
intermediate
advanced
10:45-12:15, Friday, 19th June 2026

Language bindings for C++ can be valuable tools for developers who wish to make C++ libraries available for use in other programming languages, like Python. There are many reasons developers may wish to do this, including testing, prototyping, or performance.

One of the issues often faced when writing bindings for C++ is the need to write excessive amounts of boilerplate code to bridge the gap between the C++ types and interfaces and their equivalents in other languages.

Building on previous presentations, this talk will not just explore how you can use Reflection in C++26 to generate the necessary binding code, but also how you can integrate this into a CMake-based build system to enable the automatic generation of bindings for existing classes or libraries with minimal additions. We will present real-world examples, primarily using Python, to show how language bindings can be automatically generated, but we also show how this can be extended to other languages.


🏷 python
🏷 bindings
🏷 cmake

Callum Piper

Callum Piper has been writing C++ since 2000. He has spent five years as a Senior Software Engineer at Bloomberg, working on Derivatives Pricing services. Prior to joining Bloomberg, Callum was a consultant for more than 10 years, during which he worked on a wide range of different teams across a number of financial, tech, and retail companies -- with vastly different experiences and results. He started his career at a small robotics company outside Cambridge that worked in the pharmaceutical industry. Callum is very interested in both understanding and improving how teams solve problems and deliver high quality software solutions for clients.