SkillAgentSearch skills...

XenoAtom.Interop

This XenoAtom.Interop project provides a set of C# libraries to interop with C/C++ libraries (musl, libgit2, sqlite, vulkan...)

Install / Use

/learn @XenoAtom/XenoAtom.Interop
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

XenoAtom.Interop 🚀

<img align="right" width="160px" height="160px" src="https://raw.githubusercontent.com/XenoAtom/XenoAtom.Interop/main/img/XenoAtom.Interop.png">

This XenoAtom.Interop project provides a set of C# libraries to interop with C/C++ libraries.

✨ Features

  • API generated automatically from C/C++ headers providing a near 100% API coverage.
  • Low-level interop with C/C++ libraries
    • The C/C++ API exposed is raw and will use pointers...etc.
    • Pure Function Pointers generated for callbacks, no managed delegates.
    • Similarly for ReadOnlySpan<byte> whenever possible.
  • Modern interop using [LibraryImport] with P/Invoke source generation.
    • Some functions taking or returning strings try to offer a more user-friendly API by using string (but the raw function is still accessible!)
    • Fast UTF16 to UTF8 string marshalling with zero allocations (for small strings).
    • DllImportResolver support for each library to customize loading the native library.
  • No native binaries are provided, only the P/Invoke bindings.
    • But some 3rd party NuGet packages might provide compatible native libraries. See the list of available compatible packages in each library below.
  • Simple API XML documentation is provided for each library whenever possible (extracted from the C/C++ headers).
  • NativeAOT Compatible.
  • Supports net8.0+

📦 Libraries

<!-- XENOATOM_INTEROP BEGIN - DO NOT EDIT: this section below is automatically generated --->

The C/C++ header files from the Alpine Linux v3.21 were used to generated automatically the .NET P/Invoke bindings.

The following libraries are available:

| Library | Native Version | Arch | NuGet | | ------- | -------------- | ---- | ----- | | XenoAtom.Interop<br>This package provides the shared types FixedArray#<T> to interop between .NET and C/C++. | <br>- | all | Build Status<br>NuGet | | XenoAtom.Interop.musl<br>musl libc is an implementation of the C standard library providing access to the Linux kernel syscalls. | musl<br>1.2.5 | linux-x64, linux-arm64 | Build Status<br>NuGet | | XenoAtom.Interop.libgit2<br>libgit2 is a pure C implementation of the git core methods. | libgit2<br>1.8.4 | all | Build Status<br>NuGet | | XenoAtom.Interop.sqlite<br>SQLite is a small and fast SQL database engine. | sqlite<br>3.48.0 | all | Build Status<br>NuGet | | XenoAtom.Interop.zlib<br>zlib compression library. | zlib<br>1.3.1 | all | Build Status<br>NuGet | | XenoAtom.Interop.vulkan<br>Vulkan is a low-overhead, cross-platform 3D graphics and compute API. | vulkan<br>1.3.296.0 | all | Build Status<br>NuGet | | XenoAtom.Interop.libdrm<br>libdrm is a userspace library that provides a user-space API to the Direct Rendering Manager. | libdrm<br>2.4.123 | linux | Build Status<br>NuGet | | XenoAtom.Interop.libgbm<br>libgbm is a userspace library that provides an abstraction for buffer management used by graphics drivers. | libgbm<br>24.2.8 | linux | Build Status<br>NuGet | | XenoAtom.Interop.libshaderc<br>libshaderc is a library for compiling GLSL/HLSL to SPIR-V. | libshaderc<br>2024.0 | all | Build Status<br>NuGet | | XenoAtom.Interop.libkmod<br>libkmod is a library for managing kernel modules. | libkmod<br>33 | linux | Build Status<br>NuGet |

<!-- XENOATOM_INTEROP END - DO NOT EDIT --->
  • all: The library is available for all supported architectures.
  • For musl library, it will work if musl is installed on the system. Typically on Alpine Linux you don't need to install anything. So the targets linux-musl-x64 and linux-musl-arm64 are supported by default.

📜 User Guide

Coming soon! 🤞

<!--For more details on how to use XenoAtom.Interop, please visit the [user guide](https://github.com/XenoAtom/XenoAtom.Interop/blob/main/doc/readme.md). -->

🪪 License

This software is released under the BSD-2-Clause license.

🤗 Author

Alexandre Mutel aka xoofx.

Related Skills

View on GitHub
GitHub Stars65
CategoryData
Updated1mo ago
Forks1

Languages

C#

Security Score

100/100

Audited on Feb 8, 2026

No findings