libgit2 / libgit2/libgit2sharp
Enable static linking of libgit2 (NativeLibrary / DirectPInvoke) for NativeAOT builds
Personne n'a encore pris cette issue.
- Langage dominant
- C#
- Étoiles
- 3.5k
- Forks
- 925
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Overview
Publishing with dotnet publish -p:PublishAot=true (NativeAOT) currently leaves the libgit2 native DLL/so/dylib in the output folder, preventing a true single-file distribution. If LibGit2Sharp exposed NativeLibrary / DirectPInvoke metadata to let the linker embed a static libgit2, NativeAOT users could ship just one executable.
Problems
- NativeAOT disables the single-file bundler, so
IncludeNativeLibrariesForSelfExtractis ignored and the native library is always emitted next to the .exe. - Distributors must ship extra files, and there is no self-extract logic at runtime.
Request
Please add official support for statically linking libgit2 when LibGit2Sharp is used with NativeAOT (for example, by publishing a package that injects the required NativeLibrary metadata).
Reference
- Microsoft Docs — “Native AOT interop”
https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/interop
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par le scénario dotnet publish -p:PublishAot=true et la référence d’interopérabilité Native AOT liée de Microsoft Docs. Déterminez comment LibGit2Sharp peut exposer les métadonnées NativeLibrary/DirectPInvoke et les empaqueter pour l’édition de liens statique de libgit2. Le travail est terminé lorsqu’une publication NativeAOT produit un seul exécutable sans DLL, .so ou .dylib libgit2 séparé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp, git
- Domaine
- build-system, tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100