Implement native library version using NativeAOT #503
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.
π Summary
This pull request implements a native library version of Platform.Data.Doublets using .NET NativeAOT (the modern successor to CoreRT) as requested in issue #40.
β What's Implemented
New NativeAOT Project:
csharp/Platform.Data.Doublets.NativeLibrary/[UnmanagedCallersOnly]attributesComplete FFI Interface: Matches existing
c/ffi.hspecificationUInt64UnitedMemoryLinks_New/Drop- Instance managementUInt64UnitedMemoryLinks_Create/Count/Update/Delete- CRUD operationsGetLibraryVersion- Version informationCross-Platform Native Compilation:
Platform.Data.Doublets.NativeLibrary.so(2.7MB)Platform.Data.Doublets.NativeLibrary.dllPlatform.Data.Doublets.NativeLibrary.dylibBuild Infrastructure:
build-native-library.sh- Multi-platform build scripttest-native-build.sh- Build verification scriptDocumentation & Examples:
π§ Technical Details
NativeAOT vs CoreRT Benefits:
Architecture:
π§ͺ Verification
β Build Success: Native compilation completes without errors
β Symbol Export: All required C functions properly exported
β File Generation: 2.7MB native shared library created
β FFI Compatibility: Matches existing
ffi.hinterface signaturesβ Cross-Platform: Supports Linux, Windows, and macOS targets
π Files Added
π― Closes
Fixes #40
This provides the modern NativeAOT solution requested in the issue, offering better performance and deployment characteristics than the original CoreRT approach.
π€ Generated with Claude Code