libgit2 / libgit2/libgit2sharp
Enable static linking of libgit2 (NativeLibrary / DirectPInvoke) for NativeAOT builds
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 3.5k
- フォーク
- 925
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
dotnet publish -p:PublishAot=true のシナリオと、リンクされている Microsoft Docs の Native AOT 相互運用リファレンスから始めます。LibGit2Sharp が NativeLibrary/DirectPInvoke メタデータをどのように公開し、それを静的な libgit2 リンク用にパッケージ化できるかを明らかにします。完了の条件は、NativeAOT の publish によって、別個の libgit2 DLL、.so、または .dylib なしで 1 つの実行可能ファイルが生成されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, git
- 領域
- build-system, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100