Repository navigation
CppInterOp version 1.8.0
Introduction
This document contains the release notes for the language interoperability library CppInterOp, release 1.8.0. CppInterOp is built on top of Clang and LLVM compiler infrastructure. Here we describe the status of CppInterOp in some detail, including major improvements from the previous release and new feature work. Note that if you are reading this file from a git checkout, this document applies to the next release, not the current one.
CppInterOp exposes API from Clang and LLVM in a backward compatibe way. The API support downstream tools that utilize interactive C++ by using the compiler as a service. That is, embed Clang and LLVM as a libraries in their codebases. The API are designed to be minimalistic and aid non-trivial tasks such as language interoperability on the fly. In such scenarios CppInterOp can be used to provide the necessary introspection information to the other side helping the language cross talk.
What's New in CppInterOp 1.8.0?
Some of the major new features and improvements to CppInterOp are listed here. Generic improvements to CppInterOp as a whole or to its underlying infrastructure are described first.
This release focuses on improving runtime introspection, extending the JIT and incremental compilation capabilities, introducing a new API dispatch mechanism, and delivering numerous robustness and correctness fixes across the interpreter and code generation layers.
External Dependencies
- CppInterOp now works with:
- llvm21
Introspection
- Adds
GetDoxygenComment()to extract Doxygen documentation comments from C++ declarations. - Adds
GetSpellingFromOperatorandGetOperatorFromSpellinghelpers. - Adds
GetPointerTypeand improvedGetReferencedTypewith rvalue support. - Adds
GetReferenceValueKind, replacingIsLValueReferenceTypeandIsRValueReferenceType. - Adds type qualifier utilities:
HasTypeQualifier,RemoveTypeQualifier, andAddTypeQualifier. - Improved type printing and reflection:
GetCompleteNamenow includes template parameters.- Fixed handling of default arguments and return types in templated functions.
- Adds
IsLambdaClassand multiple fixes for templated and forward-declared entities. - Improves correctness of variable offsets, base class introspection, and method
lookup.
Just-in-Time Compilation
- Adds full support for --Out-of-Process JIT--, including documentation and test infrastructure.
- Improves clang-repl integration and symbol handling across LLVM 18–21.
- Adds
DefineAbsoluteSymbolto define injected symbols in the JIT. - Major improvements to
JitCalland runtime code generation:- Constructor call support and improved handling of arrays in construct/destruct APIs.
- Support for move semantics (e.g.
std::unique_ptr). - Fixes for lambdas as return types, duplicate symbols, enums vs. functions, and namespace conflicts.
- Improves diagnostics in
JitCall::AreArgumentsValid.
Incremental C++
- Adds Cling transaction guards to prevent crashes in
GetNamedandGetAllCppNames. - Improves interpreter lifetime management and ownership semantics.
- Stabilizes successive
Declarecalls and template instantiation workflows. - Improves integration with LLJIT and incremental execution.
Misc
- Introduces a new API Dispatch mechanism:
- Allows using CppInterOp without direct linking via runtime symbol dispatch (
CppGetProcAddress). - Prevents LLVM/Clang symbol leakage into client applications.
- Enables safe dynamic loading of CppInterOp alongside other LLVM-based libraries.
- Current limitations:
- Overloaded public APIs are not supported.
- API must be initialized via
LoadDispatchAPIbefore use. - Default arguments are not available in dispatched calls.
- Allows using CppInterOp without direct linking via runtime symbol dispatch (
- Improves Emscripten support, CI pipelines, and deployment examples.
- Reorganizes public headers (
CppInterOp.h) into a dedicated include path. - Numerous improvements to CMake configuration, CI workflows, and documentation.
Special Kudos
This release wouldn't have happened without the efforts of our contributors, listed in the form of Firstname Lastname (#contributions):
FirstName LastName (#commits)
A B (N)
Matthew Barton (61; CI, Emscripten & deployment work, build and workflow maintenance)
Aaron Jomy (36; API dispatch, JIT / JitCall improvements, extensive tests and docs)
Vipul Cariappa (34; template & codegen fixes, type-reflection and interpreter robustness)
Vassil Vassilev (12; interpreter lifecycle, test coverage, refactorings and cleanup)
Abhinav Kumar (2; out-of-process JIT implementation and related integration)
Aditya Pandey (2; GetDoxygenComment API and README/build corrections)
Vincenzo Eduardo Padulano (1; target-existence checks and robustness fixes)
Stephan Hageboeck (1; test/build adjustments and gtest compatibility)
Mattias Ellert (1; platform-correctness tests for struct sizing)
Jonas Hahnfeld (1; conditional LLVM option handling / build integration)
Anutosh Bhat (1; compatibility fix for CLANG_VERSION_MAJOR > 21)
What's Changed
- [interpreter] Drop IncrementalExecutor offsets to obtain LLJIT for Cling by @aaronj0 in #589
- Add $ErrorActionPreference = "Stop" Windows Emscripten build ci by @mcbarton in #575
- [ci] Turn building and testing CppInterOp into reusable action by @mcbarton in #540
- Fix Emscripten workflows by @mcbarton in #593
- Move CppInterOp.h into its own location; issue a warning to help users. by @vgvassilev in #591
- Add smallpt example to deployment by @mcbarton in #595
- Includes must be in this order, windows.h first by @vgvassilev in #599
- Remove redundant build of Google Test in Windows ci (built as part of check-cppinterop) by @mcbarton in #601
- [ci] Make Building and Testing cppyy in reusable action by @mcbarton in #602
- add
IsLValueReferenceType&GetReferencedTypeby @Vipul-Cariappa in #596 - Remove LLVM_ENABLE_ZSTD=OFF, LLVM_ENABLE_TERMINFO=OFF and LLVM_ENABLE_LIBXML2=OFF options llvm native build by @mcbarton in #603
- [bug fix] Add Valgrind command to build and test cppyy action by @mcbarton in #606
- set
IS_VALGRINDenvrionment variable by @Vipul-Cariappa in #608 - Stack the created interpreters. by @vgvassilev in #607
- Use pragma for deprecated warning message MSVC compiler by @mcbarton in #609
- Destroy the interpreters when they are owned. by @vgvassilev in #610
- [ci] Make building native llvm into reusable action by @mcbarton in #611
- fix: codegen for nested namespace with using by @Vipul-Cariappa in #612
- Update codecov action to use files instead of file by @mcbarton in #613
- Remove cling 1.0 support + Make llvm 16 minimum version by @mcbarton in #581
- Fix api documentation readthedocs by @mcbarton in #615
- Fix bugs in documentation relating to environment variables by @mcbarton in #604
- Make native workflows have 1 stage by @mcbarton in #614
- [ci] fix workflow names by @aaronj0 in #620
- [tests] Use
size_tin variable reflection offset tests by @aaronj0 in #622 - fix ambiguity in ScopeReflection
GetAllCppNamesunittest by @aaronj0 in #623 - Documentation for debugging CppInterOp using LLDB by @kr-2003 in #621
- fix
GetFunctionReturnTypefor templated class's method by @Vipul-Cariappa in #624 - Update Emscripten instructions to match xeus-cpp in where dependencies are installed from + mount tag files (no longer preloaded in xeus-cpp) by @mcbarton in #618
- Add
GetPointerType& updateGetReferencedTypefor rvalue by @Vipul-Cariappa in #627 - add
GetSpellingFromOperator&GetOperatorFromSpellingby @Vipul-Cariappa in #628 - Merge all native platform specific workflows into 1 again by @mcbarton in #625
- improve the CppInterOp.h include directory warning by @aaronj0 in #630
- fix: codegen need not instantiate func body if it can be resolved by @Vipul-Cariappa in #626
- fix codegen & instantiation of templated function with rvalue as parameter by @Vipul-Cariappa in #633
- Fix case where preloaded paths have @ in them by @mcbarton in #619
- [MRE] successive Declare fails if InstantiateFunctionDefinition fails in MakeFunctionCallable by @Vipul-Cariappa in #616
- Add support for array of objects in Construct/Destruct by @aaronj0 in #587
- Fix ncpus environment variable ci by @mcbarton in #636
- [docs] update header include to new style by @aaronj0 in #638
- rename generic/ctor wrapper name by @aaronj0 in #639
- fix: codegen for templates with multiple parameter packs by @Vipul-Cariappa in #640
- Only cancel in progress workflow runs for pull requests by @mcbarton in #634
- Make CppInterOp work with new gtest target names. by @hageboeck in #643
- Add Emscripten static library build CppInterOp by @mcbarton in #641
- fix: handle cases where a class is declared before defining by @Vipul-Cariappa in #644
- [test] Improve struct size check for 32-bit and MSVC double alignment by @aaronj0 in #649
- Update clang-format standard to c++17 by @mcbarton in #645
- Remove continue-on-error Windows Emscripten by @mcbarton in #646
- Fix ninja Emscripten build by @mcbarton in #648
- fix: JITCall codegen to deal with enums and funcs with same name by @Vipul-Cariappa in #652
- Improve Cpp::Construct pointer logic for memory arena flags by @aaronj0 in #650
- Improve
Cpp::Destructto return success/failure of wrapper generation by @aaronj0 in #653 - Fix TEST_SHARED_LIBRARY_PATH for different build configs by @mcbarton in #656
- Remove llvm 16 and 17 compatibility by @mcbarton in #659
- Fix bugs related to printing types by @Vipul-Cariappa in #661
- Run browser tests on Windows by @mcbarton in #674
- fix JITcall codegen to handle move semantics by @Vipul-Cariappa in #657
- Fix Jupyter Lite serve instruction by @mcbarton in #654
- Add
HasTypeQualifierandRemoveTypeQualifierby @Vipul-Cariappa in #594 - Stop unused variable warnings if llvm built with assertions off by @mcbarton in #679
- handle forward declarations of classes when retrieving methods by @Vipul-Cariappa in #688
- Separate build instructions for Windows and Unix into separate sections in README.md by @mcbarton in #664
- Remove Windows cross compile patch by @mcbarton in #685
- Use EMCC_SUFFIX instead of trying to manually determine which platform we are cross compiling from by @mcbarton in #683
- Detect Windows Emscripten test failures by @mcbarton in #677
- fix codegen for template operator by @Vipul-Cariappa in #682
- fix GetNumBases to handle templated typedefs by @Vipul-Cariappa in #681
- Enable exceptions deployment by @mcbarton in #686
- Fix XEUS_CPP_RESOURCE_DIR in Emscripten build instructions by @mcbarton in #687
- Add
IsLambdaClassby @Vipul-Cariappa in #691 - Run browser tests in safari by @mcbarton in #684
- Backport enable exception handling patch to llvm 19 by @mcbarton in #692
- fix GetVariableOffset for templated static variable by @Vipul-Cariappa in #629
- fix look up of shadow constructor by @Vipul-Cariappa in #689
- Reduce CppInterOp Emscripten shared library size by @mcbarton in #655
- Remove unused variables by @mcbarton in #694
- fix JitCall codegen for duplicate symbols within namespaces by @Vipul-Cariappa in #696
- fix JitCall codegen for function with lambda as return value by @Vipul-Cariappa in #678
- Remove unneeded FixTypeName by @mcbarton in #699
- Remove unneeded MakeResourceDir by @mcbarton in #700
- Update checkout action to v5 by @mcbarton in #703
- fix GetFunctionAddress for templated functions by @Vipul-Cariappa in #702
- Ensure target exists before calling function by @vepadulano in #705
- Only include
AddLLVM/HandleLLVMOptionswhen standalone by @hahnjo in #706 - Bump threshold and readd annotations by @vgvassilev in #707
- [Thread-Safety] Add Mutex per Interpreter by @Vipul-Cariappa in #698
- Fix MacOS jobs ci by @mcbarton in #711
- fix DestructArray test by @Vipul-Cariappa in #710
- Enable FunctionReflectionTest FailingTest1 for Emscripten shared library by @mcbarton in #715
- [ci] Lock numba to version 0.61.2 by @aaronj0 in #719
- Move MacOS x86 runners to MacOS 15 by @mcbarton in #718
- Skip MultipleInterpreter test due to segmentation fault issue by @mcbarton in #720
- Improve Cpp::Destruct documentation and param name by @aaronj0 in #725
- Initialize all ASM Parsers in the interpreter by @aaronj0 in #724
- Drop pin on nlohmann json in Emscripten xeus-cpp environment file by @mcbarton in #723
- Revert Thread-Safety by @Vipul-Cariappa in #729
- Add Windows Emscripten build of xeus-cpp to ci by @mcbarton in #647
- Update setup-python action to v6 by @mcbarton in #722
- Remove restriction on number of processes for Emscripten static library build on MacOS Github runners by @mcbarton in #713
- Update coverage bot to Ubuntu 24.04 x86 bot by @mcbarton in #735
- [ci] Remove llvm 19 Emscripten jobs by @mcbarton in #738
- Out-Of-Process Interpreter for CppInterOp by @kr-2003 in #717
- fix: overload resolution for template pack of rvalue reference by @Vipul-Cariappa in #757
- add
GetValueKindby @Vipul-Cariappa in #758 - [test] instantiating template multiple times with same types by @Vipul-Cariappa in #756
- Only run Valgrind on ci jobs we choose ci by @mcbarton in #760
- Drop smallpt notebook reference from Emscripten build instructions by @mcbarton in #762
- [interp] Register runtime symbols for clang-repl by @aaronj0 in #726
- Update emsdk used to 4.0.9 by @mcbarton in #753
- Modify Clang-REPL instruction in README file by @AdityaPandeyCN in #765
- fix common namespaces for public API and internals by @aaronj0 in #766
- Update MacOS arm jobs in ci to MacOS 26 by @mcbarton in #728
- Update checkout action to v6 by @mcbarton in #763
- Fix missing semicolon for CLANG_VERSION_MAJOR > 21 branch by @anutosh491 in #769
- Add Cling transactions preventing ROOT crashes in GetNamed/GetAllCppNames by @aaronj0 in #767
- [cmake] Drop unecessary branches, improve format/indenting by @aaronj0 in #736
- Add llvm 21 support by @mcbarton in #672
- [cmake][tests] Consolidate common logic to
add_cppinterop_unittestby @aaronj0 in #770 - [ci] Turn Cppyy on for llvm 20 and llvm 21 by @mcbarton in #779
- Add GetDoxygenComment API for extracting documentation comments by @AdityaPandeyCN in #768
- add library path based on resource directory by @Vipul-Cariappa in #777
- Add CppInterOp API Dispatch mechanism by @aaronj0 in #780
- Update Emscripten jobs to add llvm 21 by @mcbarton in #776
- Add raytracer notebook to deployment by @mcbarton in #786
New Contributors
- @hageboeck made their first contribution in #643
- @vepadulano made their first contribution in #705
- @hahnjo made their first contribution in #706
- @AdityaPandeyCN made their first contribution in #765
Full Changelog: v1.7.0...v1.8.0