XenoAtom.Interop.libgit2 1.0.0-alpha.2

Prefix Reserved
This is a prerelease version of XenoAtom.Interop.libgit2.
dotnet add package XenoAtom.Interop.libgit2 --version 1.0.0-alpha.2                
NuGet\Install-Package XenoAtom.Interop.libgit2 -Version 1.0.0-alpha.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XenoAtom.Interop.libgit2" Version="1.0.0-alpha.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XenoAtom.Interop.libgit2 --version 1.0.0-alpha.2                
#r "nuget: XenoAtom.Interop.libgit2, 1.0.0-alpha.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XenoAtom.Interop.libgit2 as a Cake Addin
#addin nuget:?package=XenoAtom.Interop.libgit2&version=1.0.0-alpha.2&prerelease

// Install XenoAtom.Interop.libgit2 as a Cake Tool
#tool nuget:?package=XenoAtom.Interop.libgit2&version=1.0.0-alpha.2&prerelease                

XenoAtom.Interop.libgit2 Build Status NuGet

This package provides a low-level and modern .NET P/Invoke wrapper around the libgit2 library.

♻️ XenoAtom.Interop

This package is part of the XenoAtom.Interop project.

libgit2 is a pure C implementation of the git core methods. For more information, see libgit2 website.

💻 Usage

After installing the package, you can access the library through the static class XenoAtom.Interop.libgit2.

For more information, see the official documentation at https://libgit2.org/libgit2/.

Example of using this library in C#:

using static XenoAtom.Interop.libgit2;

// Initialize libgit2
var ret = git_libgit2_init();
ret.Check(); // Automatically throws LibGit2Exception exception if the return value is not 0

// Open a repository
git_repository_open(out var repo, "path/to/repo").Check();

// Do something with the repository
// ...

📦 Compatible Native Binaries

This library does not provide C native binaries but only P/Invoke .NET bindings to libgit2 1.7.2-r0.

If the native library is already installed on your system, check the version installed. If you are using this library on Alpine Linux, see the compatible version in the Supported API section below. Other OS might require a different setup.

For convenience, you can install an existing NuGet package (outside of XenoAtom.Interop project) that is providing native binaries. The following packages were tested and are compatible with XenoAtom.Interop.libgit2:

NuGet Package with Native Binaries Version
LibGit2Sharp.NativeBinaries 2.0.322

📚 Supported API

This package is based on the following header version:

  • libgit2 C include headers: libgit2-dev
  • Version: 1.7.2-r0
  • Distribution: AlpineLinux v3.20

The following API were automatically generated from the C/C++ code:

🪪 License

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

🤗 Author

Alexandre Mutel aka xoofx.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-alpha.2 38 7/17/2024
1.0.0-alpha.1 59 5/19/2024