Closed ElusAegis closed 1 month ago
@ElusAegis wasm tests are currently cooked because of relative imports :)
@alexander-camuto I think this is ready for another review
ios-integration-tests
to be run locally, that required to patch uniffi_testing
crate, which has an issue submitted to resolve this. This also required to add the build.rs
file to set up correct ENV variable for the ios bindings test. Optionally, we could remove build.rs
and instead force users to set this variable before running the tests.target_os = "ios"
to a specific feature for ios bindings - ios-bindings
. Additionally added ios-bindings-test
feature for the tests. This is useful to enable some test
dependencies only when testing, thus making the bindings leaner.Cargo.toml
file to optimise out dependencies that are not needed for ios
and wasm
bindings, such as clap
. Additionally, cleaned up the code, so that it would compile with --no-default-features
flag, by conditinally compiling some modules only when feature ezkl
is enabled (which was previously gated by target_arch = "wasm32"
. This is useful when we want to have as lean version of EZKL as possible, for for example ios bindings. wasm
tests.ios-integration-tests
and swift-package-tests
to rust.yml
to test the ios bindings and ios bindings package. To finish integration, we need to move the iOS EZKL Swift Package under the zkonduit control and correctly setup repository secrets to enable the update-ios-package.yml
to function and push releases.
Possibly, update-ios-package.yml
can be integrated into release
workflow.
@ElusAegis a few conflicts to resolve given the reusable verifier merge and then will merge in
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:
bindings
module to consolidate all bindings, moving the previously existingpython
andwasm
bindings under it.bindings/universal
module containinguniffi
-compatible bindings. These bindings implement most functions by reusing code from the existingwasm
bindings.wasm
bindings to leverage the shared code from theuniversal
bindings.bin/ios_gen_bindings
to generate iOS bindings and package them for integration into iOS projects..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.