Implement native library version using NativeAOT#503
Open
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #40
- Create Platform.Data.Doublets.NativeLibrary project with NativeAOT support - Implement C-style FFI exports matching existing ffi.h interface: * UInt64UnitedMemoryLinks_New/Drop for instance management * UInt64UnitedMemoryLinks_Create/Count/Update/Delete for operations * GetLibraryVersion for version info - Add build scripts for cross-platform native compilation - Include comprehensive documentation and C usage example - Successfully generates 2.7MB native shared library (.so) with all symbols exported - Compatible with existing FFI interface, provides modern NativeAOT alternative to CoreRT 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
📋 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