ezkl
ezkl copied to clipboard
feat: Integrating iOS Bindings for the EZKL Library
PR: Integrating iOS Bindings for the EZKL Library
This PR introduces iOS bindings for the EZKL library, developed using the uniffi package. This package facilitates the generation of bindings for multiple platforms, including iOS (Swift), as well as Android (Kotlin, Java), Python, and Ruby.
Key Updates:
- Created a new
bindings
module to consolidate all bindings, moving the previously existingpython
andwasm
bindings under it. - Introduced a
bindings/universal
module containinguniffi
-compatible bindings. These bindings implement most functions by reusing code from the existingwasm
bindings. - Refactored the
wasm
bindings to leverage the shared code from theuniversal
bindings. - Added a new script
bin/ios_gen_bindings
to generate iOS bindings and package them for integration into iOS projects. - Included a new GitHub Actions workflow
.github/workflows/update-ios-package.yml
to test the bindings and automatically update the iOS package with the latest bindings when a new release of EZKL comes out.
Next Steps:
We should consider migrating the iOS EZKL package under the zkonduit organization to better streamline the development process.
Future Considerations:
A larger refactor could further simplify the code by avoiding the need to use cfg(not(any(target_os = "ios", target_arch = "wasm32")))
for functions that should be excluded from the bindings. Moving such functions into a separate module would reduce the number of changes introduced by this PR and improve code clarity.