Skip to content

Accurate and high performance C++ interop code generator for C#.

License

Notifications You must be signed in to change notification settings

swiftfn/SharpGenTools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SharpGenTools

Build Status MyGet Pre Release NuGet Docs codecov CodeFactor

Accurate and high performance C++ interop code generator for C#.

Features

  • Accurate, fast code-gen for C++ and COM interfaces from their C++ headers.
  • No dependencies on .NET Runtime COM support
  • Supports passing code-gen information through MSBuild project and package references
  • Pluggable Runtime Library Name and runtime support type names (default library is SharpGen.Runtime)
    • Projects that implement their own SharpGenTools runtime support classes can add mapping rules to ensure that their generated code uses their runtime support library.

Components in this Repo

  • SharpGen
    • The code-gen engine that runs CastXML to parse the C++ and then generates the C# interop code.
  • SharpPatch
    • Patches the calli instructions for efficient C++ interop as well as other constructs not possible in C#
  • SharpGenTools.Sdk
    • MSBuild tooling to integrate SharpGen and SharpPatch directly into projects
  • SharpGen.Runtime
    • Runtime support classes for code generated by SharpGen.
  • SharpGen.Interactive
    • Legacy command line front-end for SharpGen with Avalonia progress-dialog
    • Xplat version of original SharpGen application
  • SharpPatch.Cli
    • Legacy command line front-end for SharpPatch
    • The original SharpCli application

Requirements

To Use

  • Any projects using the SDK to generate code must use new SDK-style projects with MSBuild 15.3 or higher (.NET Core 2.0 SDK or VS 2017.3)
  • Make any mapping files a SharpGenMapping item in your .csproj.

To Build

  • MSBuild 15.3 or newer.
  • .NET Core 2.0
  • CMake 3.0 or newer.

About

Accurate and high performance C++ interop code generator for C#.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 44.1%
  • C 41.2%
  • C# 14.6%
  • Other 0.1%