Skip to content

feat: dart bindings#24

Merged
Nic-dorman merged 11 commits intomaidsafe:mainfrom
Nic-dorman:feat/dart-bindings
Feb 6, 2026
Merged

feat: dart bindings#24
Nic-dorman merged 11 commits intomaidsafe:mainfrom
Nic-dorman:feat/dart-bindings

Conversation

@Nic-dorman
Copy link
Contributor

No description provided.

Nic-dorman and others added 11 commits February 5, 2026 11:09
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Runs on push/PR to main:
- Builds Rust FFI library
- Builds C# bindings with dotnet
- Runs unit tests (integration tests excluded)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements Lua bindings for the Autonomi network using LuaJIT FFI:

- Core infrastructure: ffi_defs, native library loading, helpers, errors
- Type wrappers: SecretKey, PublicKey, Chunk, DataAddress, DataMapChunk
- Network types: Pointer, Scratchpad, Register, GraphEntry, Archive
- Client with async operations via thread-safe Rust async_helper
- Comprehensive test suite (49 tests) including round-trip integration test

Uses UniFFI serialization format with proper big-endian encoding for
PaymentOption enum and all buffer operations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove build artifacts that should not be committed:
- lua/ant_ffi/ant_ffi.dll (17MB)
- lua/ant_ffi/async_helper.dll (11KB)

These are generated during the build process and should be
built locally or obtained from releases.

Updated .gitignore to prevent future commits of:
- Lua DLL/SO/dylib files
- Rust async_helper target directory

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Lua to platform table
- Document prerequisites (LuaJIT, Rust, C compiler)
- Add build instructions for ant_ffi and async_helper libraries
- Include quick start code example
- Document test files and how to run them

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add GitHub Actions workflow for Lua bindings that:
- Sets up LuaJIT 2.1
- Builds ant_ffi Rust library
- Builds async_helper Rust library
- Runs unit tests (self-encryption, keys, data types, all types, async helper)

Integration tests requiring a network are excluded from CI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add dart:ffi bindings using ffigen for C header interop
- Implement async future polling for UniFFI async operations
- Add Client with initLocal() and initWithPeers() methods
- Add types: SecretKey, PublicKey, Chunk, Address, Network, Wallet
- Add self-encryption encrypt/decrypt functions
- Include unit tests for keys, data types, and self-encryption
- Include e2e roundtrip test for network upload/download
- Add CI workflow for Dart tests
- Update README with Dart documentation and binding regeneration guide

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The dependabot bump to 0.10.0 was incomplete. This adds the required
API changes:

- Network::custom() now takes 4th parameter (royalties_pk_hex)
- file_cost() now takes follow_symlinks and include_hidden params
- dir_upload/dir_upload_public now take Wallet directly
- file_content_upload uses BulkPaymentOption via .into()
- dir_content_upload uses BulkPaymentOption via .into()

Updated bindings:
- PHP: Network.php, RustBuffer.php, ant_ffi.h
- Swift: Regenerated UniFFI bindings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add dataCost() method to Dart client for cost estimation before upload
- Add data_cost() method to Lua client
- Add Flutter example app with upload/download UI and quote display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolves conflicts with C# bindings that were merged separately.
Keeps Lua and Dart documentation in README.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Nic-dorman Nic-dorman merged commit 3099ab5 into maidsafe:main Feb 6, 2026
5 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant