Our great sponsors
-
SWIG
SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I have once made something remotely similar, to interop between C++ and C#: https://github.com/Const-me/ComLightInterop
I took different approach. Because I only needed to support these two languages, there’s no separate interface definition language, and no code generator for interfaces. Instead, users are expected to write both language projections manually.
Then there’s a runtime code generator on the .NET side of the interop which builds runtime callable proxy types for interfaces implemented in C++, also virtual tables for C# objects consumed by C++.
> create a proper C binding to the C++ interface
That's the generally recommended way of exposing your C++ library to any kind of non-C++ code.
I'm not aware of any software which directly helps with that, unfortunately. You either do it manually or write a bunch of custom scripts. Here's a recent example of the latter, from Dear ImGui:
https://github.com/dearimgui/dear_bindings