Swig – Connect C/C++ programs with high-level programming languages

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • SWIG

    SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages.

  • nanobind

    nanobind: tiny and efficient C++/Python bindings

  • 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.

    InfluxDB logo
  • ComLightInterop

    Cross-platform COM interop library for .NET Core 2.1 or newer

  • 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++.

  • dear_bindings

    C header (and language binding metadata) generator for Dear ImGui

  • > 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

  • pybind11

    Seamless operability between C++11 and Python

  • 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.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts