GithubHelp home page GithubHelp logo

xenoatom / xenoatom.interop Goto Github PK

View Code? Open in Web Editor NEW
52.0 2.0 0.0 4.52 MB

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

License: BSD 2-Clause "Simplified" License

C# 99.99% C 0.01%
dotnet musl pinvoke pinvoke-wrapper sqlite ligbit2 libdrm shaderc vulkan libgbm

xenoatom.interop's Introduction

XenoAtom.Interop ๐Ÿš€

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

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

The following libraries are available:

Library Native Version Arch NuGet
XenoAtom.Interop
This package provides the shared types FixedArray#<T> to interop between .NET and C/C++.

-
all Build Status
NuGet
XenoAtom.Interop.musl
musl libc is an implementation of the C standard library providing access to the Linux kernel syscalls.
musl
1.2.5
linux-x64, linux-arm64 Build Status
NuGet
XenoAtom.Interop.libgit2
libgit2 is a pure C implementation of the git core methods.
libgit2
1.7.2
all Build Status
NuGet
XenoAtom.Interop.sqlite
SQLite is a small and fast SQL database engine.
sqlite
3.45.3
all Build Status
NuGet
XenoAtom.Interop.zlib
zlib compression library.
zlib
1.3.1
all Build Status
NuGet
XenoAtom.Interop.vulkan
Vulkan is a low-overhead, cross-platform 3D graphics and compute API.
vulkan
1.3.261.1
all Build Status
NuGet
XenoAtom.Interop.libdrm
libdrm is a userspace library that provides a user-space API to the Direct Rendering Manager.
libdrm
2.4.120
linux Build Status
NuGet
XenoAtom.Interop.libgbm
libgbm is a userspace library that provides an abstraction for buffer management used by graphics drivers.
libgbm
24.0.9
linux Build Status
NuGet
XenoAtom.Interop.libshaderc
libshaderc is a library for compiling GLSL/HLSL to SPIR-V.
libshaderc
2024.0
all Build Status
NuGet
XenoAtom.Interop.libkmod
libkmod is a library for managing kernel modules.
libkmod
32
linux Build Status
NuGet
  • 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! ๐Ÿคž

๐Ÿชช License

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

๐Ÿค— Author

Alexandre Mutel aka xoofx.

xenoatom.interop's People

Contributors

xoofx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xenoatom.interop's Issues

Add support for vulkan

Started dev in a branch, seems relatively straightforward to bring, some fixes/changes to CppAst.CodeGen required though

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.