Tools and libraries to glue C/C++ APIs to high-level languages
 
 
 
 
 
triton 0926734f38 Walk the vtable further down after all the child declarations of the class have been processed so that we find the proper methods once we walk the vtable components. 12 years ago
build Update the tests to compile again. 12 years ago
deps Added missing unit testing dependencies. 13 years ago
docs Updated users manual. 12 years ago
examples Remove the OpenCV example. 12 years ago
include Renamed C++/CLI runtime helpers to CppSharp.h. 12 years ago
patches This patch has been committed in Clang mainline. 13 years ago
src Walk the vtable further down after all the child declarations of the class have been processed so that we find the proper methods once we walk the vtable components. 12 years ago
tests Move the AST project to the CppSharp.AST namespace. 12 years ago
.gitignore Updated the .gitignore patterns. 13 years ago
Building.txt Fix doc. 13 years ago
LICENSE Update the license information. 13 years ago
README.md Added work-in-progress getting started documentation. 12 years ago

README.md

CppSharp

What does it do?

This tool allows you to generate .NET bindings that wrap C/C++ code allowing interoperability with managed languages. This can be useful if you have an existing native codebase and want to add scripting support, or want to consume an existing native library in your managed code.

Why reinvent the wheel?

There are not many automated binding tools around, the only real alternative is SWIG. So how is it different from SWIG?

  • No need to generate a C layer to interop with C++.
  • Based on an actual C++ parser (Clang) so very accurate.
  • Understands C++ at the ABI (application binary interface) level
  • Easily extensible semantics via user passes
  • Strongly-typed customization APIs
  • Can be used as a library

Can I use it yet?

It is being used to bind "real-world" complex codebases successfully, so give it a shot.

Since C and C++ provide such a wide array of features I'm sure there's still tonnes of bugs and unsupported edge cases, but give and try and report any bugs you find and I'll try to fix them ASAP.

Getting started

Since binary releases have not been provided yet, you will have to compile the project and dependencies manually (LLVM and Clang).

The documentation is still a work-in-progress, please see the following resources for more information:

Getting Started

User's Manual

Developer's Manual

Similiar Tools