{"id":19611625,"url":"https://github.com/xenoatom/xenoatom.interop","last_synced_at":"2025-04-27T22:33:35.185Z","repository":{"id":240534074,"uuid":"796213600","full_name":"XenoAtom/XenoAtom.Interop","owner":"XenoAtom","description":"This XenoAtom.Interop project provides a set of C# libraries to interop with C/C++ libraries (musl, libgit2, sqlite, vulkan...)","archived":false,"fork":false,"pushed_at":"2025-03-30T19:10:23.000Z","size":5271,"stargazers_count":60,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-19T21:25:28.755Z","etag":null,"topics":["dotnet","libdrm","libgbm","ligbit2","musl","pinvoke","pinvoke-wrapper","shaderc","sqlite","vulkan"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XenoAtom.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["xoofx"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2024-05-05T09:31:44.000Z","updated_at":"2025-04-13T12:52:56.000Z","dependencies_parsed_at":"2024-11-11T10:41:47.398Z","dependency_job_id":null,"html_url":"https://github.com/XenoAtom/XenoAtom.Interop","commit_stats":null,"previous_names":["xenoatom/xenoatom.interop"],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XenoAtom%2FXenoAtom.Interop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XenoAtom%2FXenoAtom.Interop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XenoAtom%2FXenoAtom.Interop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XenoAtom%2FXenoAtom.Interop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XenoAtom","download_url":"https://codeload.github.com/XenoAtom/XenoAtom.Interop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251219600,"owners_count":21554444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","libdrm","libgbm","ligbit2","musl","pinvoke","pinvoke-wrapper","shaderc","sqlite","vulkan"],"created_at":"2024-11-11T10:41:35.667Z","updated_at":"2025-04-27T22:33:30.167Z","avatar_url":"https://github.com/XenoAtom.png","language":"C#","funding_links":["https://github.com/sponsors/xoofx"],"categories":[],"sub_categories":[],"readme":"# XenoAtom.Interop 🚀\n\n\u003cimg align=\"right\" width=\"160px\" height=\"160px\" src=\"https://raw.githubusercontent.com/XenoAtom/XenoAtom.Interop/main/img/XenoAtom.Interop.png\"\u003e\n\nThis **XenoAtom.Interop** project provides a set of C# libraries to interop with C/C++ libraries.\n\n## ✨ Features\n\n- **API generated automatically** from C/C++ headers providing a near **100% API coverage**.\n- **Low-level interop** with C/C++ libraries\n  - The C/C++ API exposed is raw and will use pointers...etc.\n  - Pure [Function Pointers](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/function-pointers) generated for callbacks, no managed delegates.\n  - Similarly for `ReadOnlySpan\u003cbyte\u003e` whenever possible.\n- **Modern interop** using [`[LibraryImport]`](https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke-source-generation) with P/Invoke source generation.\n  - Some functions taking or returning strings try to offer a more user-friendly API by using `string` (but the raw function is still accessible!)\n  - Fast UTF16 to UTF8 string marshalling with zero allocations (for small strings).\n  - [`DllImportResolver`](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.nativelibrary.setdllimportresolver) support for each library to customize loading the native library.\n- No native binaries are provided, **only the P/Invoke bindings**.\n  - But some 3rd party NuGet packages might provide compatible native libraries. See the list of available compatible packages in each library below.\n- **Simple API XML documentation** is provided for each library whenever possible (extracted from the C/C++ headers).\n- **NativeAOT** Compatible.\n- Supports `net8.0`+\n\n## 📦 Libraries\n\n\u003c!-- XENOATOM_INTEROP BEGIN - DO NOT EDIT: this section below is automatically generated ---\u003e\n\nThe C/C++ header files from the [Alpine Linux](https://www.alpinelinux.org/) `v3.20` were used to generated automatically the .NET P/Invoke bindings.\n\nThe following libraries are available:\n\n| Library | Native Version | Arch | NuGet |\n| ------- | -------------- | ---- | ----- |\n| [XenoAtom.Interop](src/common)\u003cbr\u003eThis package provides the shared types `FixedArray#\u003cT\u003e` to interop between .NET and C/C++. | \u003cbr\u003e`-` | `all` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_common.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_common.yml)\u003cbr\u003e[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.svg)](https://www.nuget.org/packages/XenoAtom.Interop) |\n| [XenoAtom.Interop.musl](src/musl)\u003cbr\u003emusl libc is an implementation of the C standard library providing access to the Linux kernel syscalls. | [musl](https://musl.libc.org/)\u003cbr\u003e`1.2.5` | `linux-x64`, `linux-arm64` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_musl.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_musl.yml)\u003cbr\u003e[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.musl.svg)](https://www.nuget.org/packages/XenoAtom.Interop.musl) |\n| [XenoAtom.Interop.libgit2](src/libgit2)\u003cbr\u003elibgit2 is a pure C implementation of the git core methods. | [libgit2](https://libgit2.org/)\u003cbr\u003e`1.7.2` | `all` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libgit2.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libgit2.yml)\u003cbr\u003e[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.libgit2.svg)](https://www.nuget.org/packages/XenoAtom.Interop.libgit2) |\n| [XenoAtom.Interop.sqlite](src/sqlite)\u003cbr\u003eSQLite is a small and fast SQL database engine. | [sqlite](https://www.sqlite.org/)\u003cbr\u003e`3.45.3` | `all` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_sqlite.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_sqlite.yml)\u003cbr\u003e[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.sqlite.svg)](https://www.nuget.org/packages/XenoAtom.Interop.sqlite) |\n| [XenoAtom.Interop.zlib](src/zlib)\u003cbr\u003ezlib compression library. | [zlib](https://zlib.net/)\u003cbr\u003e`1.3.1` | `all` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_zlib.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_zlib.yml)\u003cbr\u003e[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.zlib.svg)](https://www.nuget.org/packages/XenoAtom.Interop.zlib) |\n| [XenoAtom.Interop.vulkan](src/vulkan)\u003cbr\u003eVulkan is a low-overhead, cross-platform 3D graphics and compute API. | [vulkan](https://registry.khronos.org/vulkan/)\u003cbr\u003e`1.3.261.1` | `all` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_vulkan.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_vulkan.yml)\u003cbr\u003e[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.vulkan.svg)](https://www.nuget.org/packages/XenoAtom.Interop.vulkan) |\n| [XenoAtom.Interop.libdrm](src/libdrm)\u003cbr\u003elibdrm is a userspace library that provides a user-space API to the Direct Rendering Manager. | [libdrm](https://gitlab.freedesktop.org/mesa/drm)\u003cbr\u003e`2.4.120` | `linux` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libdrm.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libdrm.yml)\u003cbr\u003e[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.libdrm.svg)](https://www.nuget.org/packages/XenoAtom.Interop.libdrm) |\n| [XenoAtom.Interop.libgbm](src/libgbm)\u003cbr\u003elibgbm is a userspace library that provides an abstraction for buffer management used by graphics drivers. | [libgbm](https://gitlab.freedesktop.org/mesa/mesa)\u003cbr\u003e`24.0.9` | `linux` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libgbm.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libgbm.yml)\u003cbr\u003e[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.libgbm.svg)](https://www.nuget.org/packages/XenoAtom.Interop.libgbm) |\n| [XenoAtom.Interop.libshaderc](src/libshaderc)\u003cbr\u003elibshaderc is a library for compiling GLSL/HLSL to SPIR-V. | [libshaderc](https://github.com/google/shaderc)\u003cbr\u003e`2024.0` | `all` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libshaderc.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libshaderc.yml)\u003cbr\u003e[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.libshaderc.svg)](https://www.nuget.org/packages/XenoAtom.Interop.libshaderc) |\n| [XenoAtom.Interop.libkmod](src/libkmod)\u003cbr\u003elibkmod is a library for managing kernel modules. | [libkmod](https://github.com/kmod-project/kmod/)\u003cbr\u003e`32` | `linux` | [![Build Status](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libkmod.yml/badge.svg)](https://github.com/XenoAtom/XenoAtom.Interop/actions/workflows/ci_build_libkmod.yml)\u003cbr\u003e[![NuGet](https://img.shields.io/nuget/v/XenoAtom.Interop.libkmod.svg)](https://www.nuget.org/packages/XenoAtom.Interop.libkmod) |\n\n\u003c!-- XENOATOM_INTEROP END - DO NOT EDIT ---\u003e\n\n- `all`: The library is available for all supported architectures.\n- For `musl` library, it will work if `musl` is installed on the system. Typically on Alpine Linux you don't need to install anything.\n  So the targets `linux-musl-x64` and `linux-musl-arm64` are supported by default.\n\n## 📜 User Guide\n\nComing soon! 🤞\n\n\u003c!--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).\n--\u003e\n\n## 🪪 License\n\nThis software is released under the [BSD-2-Clause license](https://opensource.org/licenses/BSD-2-Clause). \n\n## 🤗 Author\n\nAlexandre Mutel aka [xoofx](https://xoofx.github.io).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxenoatom%2Fxenoatom.interop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxenoatom%2Fxenoatom.interop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxenoatom%2Fxenoatom.interop/lists"}