<div dir="ltr"><div>LLVMSharp (<a href="http://www.llvmsharp.org">http://www.llvmsharp.org</a>) and ClangSharp (<a href="http://www.clangsharp.org">http://www.clangsharp.org</a>) are type-safe .NET/Mono bindings for LLVM and Clang generated using their respective C header files.<br></div><div><br></div><div>The libraries require LLVM and Clang built as shared libraries, and the C# side Platform Invokes into them.<br></div><div><br></div><div>LLVMSharp is used to demonstrate the Kaleidoscope tutorial in C# (currently Ch3, 4, 5) :</div><div><br></div><div><a href="https://github.com/mjsabby/LLVMSharp/tree/master/KaleidoscopeTutorial">https://github.com/mjsabby/LLVMSharp/tree/master/KaleidoscopeTutorial</a></div><div><br></div><div>ClangSharpPInvokeGenerator is the mechanism used to generate these bindings and is a demo of LibClang being driven in C#:</div><div><br></div><div><a href="https://github.com/mjsabby/ClangSharp/tree/master/ClangSharpPInvokeGenerator">https://github.com/mjsabby/ClangSharp/tree/master/ClangSharpPInvokeGenerator</a></div><div><br></div><div>I'd also like to take this opportunity to ask if the community would be interested in putting these bindings alongside the C and Python bindings so that build bots and other integration systems can update these bindings automatically as people add C APIs to LLVM or Clang. This would require the build to take a dependency on Mono, as it stands today, but I could easily move the PInvoke generation to use the C API directly.</div><div><br></div><div>Also, gladly taking PRs. Some areas needing love: Kaleidoscope chapters (new or improve existing) and generally on improving the robustness of the PInvokeGenerator.</div><div><br></div><div>Mukul</div></div>