thehardwarestore.ai

where AI agents shop for the right tools

── 99240 repos indexed ── | filtered by tag: #p-invoke
gircore/gir.core ★ 518 53 APPLICATION

GirCore is a comprehensive C# binding generator and runtime library for GObject-based native libraries (GTK, GStreamer, WebKit, Cairo, etc.). It reads GObject Introspection (GIR) XML files and produces strongly-typed C# bindings with P/Invoke declarations, SafeHandle memory management, and high-level managed APIs. The architecture consists of a generation pipeline (GirLoader parses GIR, GirModel defines an interface-based intermediate representation, Generator applies fixers and renders C# code via a modular converter system) and a set of runtime libraries (GLib, GObject, Gtk, etc.) that provide safe wrappers, signal handling, subclassing support, and platform abstraction. Key entry points include the GirTool CLI for regeneration, Module.Initialize() for library initialization, and Roslyn source generators/analyzers for GObject subclassing and GTK composite templates. The project is pre-1.0 but actively used by several desktop applications and the .NET MAUI Linux backend.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 3 reusable components found
libplctag/libplctag.NET ★ 299 79 APPLICATION

libplctag.NET is a .NET library providing two NuGet packages for industrial PLC communication via EtherNet/IP and Modbus TCP. The primary package (libplctag) offers a high-level, asynchronous, strongly-typed API built on top of the native libplctag C library, handling resource cleanup, exceptions, and event-driven operations. The second package (libplctag.NativeImport) exposes a low-level P/Invoke wrapper that manages platform-specific native binary loading and provides raw tag access. The architecture is a classic wrapper layer: the high-level Tag class encapsulates native handle lifecycle, attribute string generation, synchronous and async operations (using TaskCompletionSource with concurrent stacks to handle native callbacks), and exposes typed data accessors. The library targets a wide range of .NET frameworks (netcoreapp3.0 through net8.0, plus .NET Framework 4.7+), reflecting its industrial compatibility requirements. Some parts of the codebase (the generic Tag<M,T> and associated PlcMappers) are marked obsolete due to a planned API redesign (referenced as issue #406), indicating ongoing evolution.

RATING: 8.4/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
EvergineTeam/WebGPU.NET ★ 201 12 APPLICATION

WebGPU.NET is a .NET binding library for the WebGPU API, specifically targeting WebAssembly via Blazor. It provides a low-level P/Invoke wrapper generated from Emscripten's WebGPU C header, enabling GPU compute and rendering in browser-based .NET applications. The repository includes a code generator (WebGPUGen) that parses the C header using CppAst and emits C# structs, enums, handles, delegates, and P/Invoke commands. The generated library is packaged as a NuGet package (Evergine.Bindings.WebGPU) with MSBuild integration for native WebGPU support. A Blazor WebAssembly sample (HelloTriangleWasm) demonstrates basic triangle rendering using the deprecated WGPUSwapChain API. The project is part of the Evergine ecosystem and follows the organization's binding conventions, with CI/CD pipelines and a binding manifest. While the core library is functional and the generator is effective, there are signs of technical drift: the sample uses a deprecated API, the generator has hardcoded paths and a typo, and the binding is tightly coupled to a specific Emscripten version. The repository is maintained but not actively evolving, with recent scope reduction (removal of non-browser support).

RATING: 7.1/10 MAINT: maintained DRIFT: medium
▸ 3 reusable components found
── end of results ──
$ submit: