libgit2 / libgit2/libgit2sharp

Enable static linking of libgit2 (NativeLibrary / DirectPInvoke) for NativeAOT builds

オープン
#2,160 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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 IncludeNativeLibrariesForSelfExtract is 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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。