Repository navigation
Conversation
…cross-platform support This comprehensive update modernizes the LibArchive.Net package to follow current .NET best practices and fully resolves issue #69 (.NET Standard support). ## Native Library Structure - Move libraries to proper runtimes/{rid}/native/ structure per Microsoft guidelines - Rename osx-any64 → osx-x64 (valid RID) - Add osx-arm64 for Apple Silicon support - Add linux-musl-x64 for Alpine Linux support - Update all build scripts to output to correct locations ## P/Invoke Modernization - Add LibraryImport for .NET 7+ (source-generated, AOT-friendly) - Keep DllImport for older frameworks (.NET Standard 2.0, .NET 6.0) - Remove unnecessary custom import resolver for .NET 6+ - Rely on automatic runtime resolution from runtimes/{rid}/native/ ## .NET Standard 2.0 Cross-Platform Support (Fixes #69) - Add dlopen() support for Linux/Mono - Add dlopen() support for macOS/Mono - Multi-version libdl compatibility (libdl.so.2, libdl.so) - Windows support via LoadLibrary() (already working) - Full cross-platform support: Windows/.NET Framework, Linux/Mono, macOS/Mono ## AOT and Trimming Support - Add IsAotCompatible=true for .NET 6+ - Add IsTrimmable=true for .NET 6+ - Enable trim analyzer for build-time validation - Enable AOT analyzer for .NET 8+ - Update package tags: AOT, NativeAOT, Trimming ## CI/CD Improvements - Fix build.yml to use new runtimes/{rid}/native/ paths - Add Mono test job for .NET Standard 2.0 validation - Multi-target test project: net9.0 and net462 - Comprehensive testing across all supported frameworks ## Platform Support Matrix - netstandard2.0: Windows/.NET Framework 4.6.1+, Linux/Mono, macOS/Mono - net6.0: All platforms with automatic library loading - net8.0: All platforms with LibraryImport and full AOT support Closes #69
Owner
Author
|
Duplicate PR - closing in favor of existing PR for this branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This comprehensive update modernizes the LibArchive.Net package to follow current .NET best practices and fully resolves issue #69 (.NET Standard support).
Summary of Changes
Native Library Structure
runtimes/{rid}/native/structure per Microsoft guidelinesosx-any64→osx-x64(valid RID)osx-arm64for Apple Silicon supportlinux-musl-x64for Alpine Linux supportP/Invoke Modernization
LibraryImportfor .NET 7+ (source-generated, AOT-friendly)DllImportfor older frameworks (.NET Standard 2.0, .NET 6.0)runtimes/{rid}/native/.NET Standard 2.0 Cross-Platform Support (Fixes #69)
dlopen()support for Linux/Monodlopen()support for macOS/Monolibdl.so.2,libdl.so)LoadLibrary()(already working)AOT and Trimming Support
IsAotCompatible=truefor .NET 6+IsTrimmable=truefor .NET 6+AOT,NativeAOT,TrimmingCI/CD Improvements
build.ymlto use newruntimes/{rid}/native/pathsPlatform Support Matrix
Testing
CI will now run:
Closes #69