# mono/CppSharp

Tools and libraries to glue C/C++ APIs to high-level languages

Repository: https://github.com/mono/CppSharp
Canonical: https://ross.abutalabs.com/products/cppsharp
Language: C#
License: MIT
License Family: permissive
Topics: cppsharp, parsing, glue, syntax-tree, c-sharp, c, clang, mono, visitors, cplusplus, parser, xamarin, xamarin-bindings, swig, interop, bindings, dotnet, pinvoke, bridge
Last push: 2026-05-18T12:47:02+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 83, release rhythm 25, longevity 100
- inputs: {"age_days": 4863, "days_push": 107, "days_rel": 287, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3404, forks 541 (observed 2026-08-28T04:08:02.996226+00:00)

## What it is
CppSharp is a tool and library set that parses C/C++ headers and libraries and generates glue code to expose native APIs as managed .NET APIs (C# and C++/CLI). It can also be used standalone as a C# library for parsing native code into a rich Clang-based syntax tree.

## Use cases
- generate C# bindings for a C/C++ library
- consume a native C++ library from .NET code
- parse C/C++ headers into a syntax tree in C#
- add managed scripting support to a native codebase
- create P/Invoke wrappers automatically
- override C++ virtual methods from managed code

## When to choose
- you need automated C/C++ to .NET bindings instead of hand-writing P/Invoke
- you want a Clang-accurate C/C++ parser accessible from C#
- you need multi-platform, multi-ABI binding generation (Itanium, MS, ARM, iOS)
- you want Doxygen comments translated to C# XML docs in bindings

## When to avoid
- you target languages other than C# or C++/CLI (consider SWIG or language-specific tools)
- you only need simple flat C interop that plain P/Invoke handles easily
- your project is not on the .NET ecosystem

## Facets
- artifact type: library
- maturity: active
- function: parser, compiler, sdk, developer-tools
- domain: developer-tools, programming-languages, parsers, cross-platform
- platform: dotnet, c, cpp, windows, cross-platform
- tags: bindings-generator, interop, pinvoke, clang, c-sharp, syntax-tree, native-interop, code-generation, macos, linux

## Member repositories
- mono/CppSharp (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:02.996226+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:38:37.466107+00:00, confidence not recorded.
  - readme: https://github.com/mono/CppSharp (fetched 2026-08-28T04:08:02.996226+00:00, sha a8f44b71fefd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
