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
20082026
-
…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? -
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…
comment by neonsunset · 2024-12-01 · in WinDepends – A Rewrite of the Dependency Walker -
…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 -
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.
comment by neonsunset · 2024-09-23 · in Rust panics under the hood, and implementing them in .NET -
…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