ezkl icon indicating copy to clipboard operation
ezkl copied to clipboard

feat: Integrating iOS Bindings for the EZKL Library

Open ElusAegis opened this issue 4 months ago • 1 comments

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:

  1. Created a new bindings module to consolidate all bindings, moving the previously existing python and wasm bindings under it.
  2. Introduced a bindings/universal module containing uniffi-compatible bindings. These bindings implement most functions by reusing code from the existing wasm bindings.
  3. Refactored the wasm bindings to leverage the shared code from the universal bindings.
  4. Added a new script bin/ios_gen_bindings to generate iOS bindings and package them for integration into iOS projects.
  5. 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.

ElusAegis avatar Oct 01 '24 12:10 ElusAegis