Skip to content

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

License

Notifications You must be signed in to change notification settings

kmgallahan/SharpGenTools

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

937 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.
    • API for SharpGen SDK plugins, e.g. documentation providers.
  • SharpGenTools.Sdk
    • MSBuild tooling to integrate SharpGen directly into projects.
    • Build-time code generation plugin platform.
  • SharpGen.Runtime
    • Runtime support classes for code generated by SharpGen.

Requirements

To Use

  • SDK-style (CPS) MSBuild projects
  • .NET environment, at least one of the following:
    • .NET SDK (5 or newer)
    • .NET Core SDK (2.1 or newer)
    • Visual Studio 2017.3 with desktop .NET workload, .NET Framework 4.7.2 SDK or newer
  • Make any mapping files a SharpGenMapping item in your .csproj.

To Build

  • .NET SDK: 5.0 or newer.
  • CMake: 3.0 or newer.
  • SDK tests require x64 Windows, VS2019 with x86 and x64 C++ compilers, recent PowerShell version.

Nightly (CI) builds

Add SharpGenTools MyGet feed to your NuGet.config:

<configuration>
  <packageSources>
    <!-- ... -->
    <add key="SharpGenTools" value="https://www.myget.org/F/sharpgentools/api/v3/index.json" />
  </packageSources>
</configuration>

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 82.6%
  • C# 16.3%
  • Other 1.1%