Hacker GitHub

← All repos

dotnet/ClangSharp

View on GitHub ↗ ★ 1,266 C#

Clang bindings for .NET written in C#

5 mentions on Hacker News by 2 people: 0 stories, 5 comments · first 2023-07-29 · latest 2025-02-11

Mentions per year 5 mentions · busiest year 2024 (3)
20082026
  1. …PInvoke in .NET than strictly necessary. > C# does not allow directly using a C header file https://github.com/dotnet/ClangSharp?tab=readme-ov-file#gene... there are bespoke libraries which build on top of it like CsWin32 where you specify…
    comment by neonsunset · 2025-02-11 · in How about trailing commas in SQL?
  2. If you do have headers, you don't have to write the bindings by hand: https://github.com/dotnet/ClangSharp?tab=readme-ov-file#gene... Also because this is Windows, there is https://github.com/microsoft/CsWin32 already (and adjacent…
  3. …export C headers, you can easily generate the bindings out of them with CLangSharpPInvokeGenerator. https://github.com/dotnet/ClangSharp I strongly caution against WASM suggestions in a sibling comment - I’m not even sure if the author has…
    comment by neonsunset · 2024-10-03 · in Pledging $300k to the Zig Software Foundation
  4. Give this tool a try: https://github.com/dotnet/ClangSharp?tab=readme-ov-file#gene... Just specify the headers to generate bindings for, and then use the generated interop code. Not too different from importing them as it was in the past.
  5. …from C++. Another alternative is "libClangSharp", from Tanner Gooding who works on C# at Microsoft. https://github.com/dotnet/ClangSharp
    comment by gavinray · 2023-07-29 · in The future of Clang-based tooling