libgit2 / libgit2/libgit2sharp

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

Đang mở
#2,160 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
C#
Star
3.5k
Fork
925
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với kịch bản dotnet publish -p:PublishAot=true và tài liệu tham chiếu về interop Native AOT được liên kết của Microsoft Docs. Xác định cách LibGit2Sharp có thể expose metadata NativeLibrary/DirectPInvoke và đóng gói chúng cho việc linking libgit2 tĩnh. Được xem là hoàn tất khi một NativeAOT publish tạo ra một executable duy nhất mà không cần DLL, .so hoặc .dylib libgit2 riêng biệt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
csharp, git
Lĩnh vực
build-system, tooling
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.