-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Assessment/Research Spike] Simplifying Cocoapods build and Distributing over SPM #311
Comments
(some ideas, as already aluded to)
yup 😊 See below
yup 😊 See below. Initial ResultsRust-less buildIt is possible to have a Rust-less build for the consumer of the SDK by packaging SPMWith the creation of a As a consumer of the SDK, the spm integration works out quite nicely 😄 (I also threw in macOS support) check out dh-ecc/PrintBlockHeight Additional ConsiderationsAdding SPM support will greatly improve the consumer UX, it will have the added bonus of removing the rust dependancy and all script integrations from the cocoapods distribution. It also gives contributors a nice SPM based developer workflow and can be extended with an additional workspace to build the rust target as a dependency of the swift library, this would require a rust toolchain, but it would be exclusively if you wanted to modify the rust portion of the code. Pre built rust binary also gives us a great CI time saving since we only need functioning swift toolchain and don't have to setup a rust one. |
Some dude, Hasan Ali Atak https://github.com/haznai, emailed me asking about #296 research spike |
@dh-ecc How would this play with Cocoapods specifically? Many developers that could potentially adopt Zcash on their apps still use it a dependency manager I do think we still need to support it. |
I've separately been looking at using We could do a straightforward translation of the current Swift and Kotlin FFI APIs to begin with, but I'm interested in leveraging |
My initial experiment from a month or so ago: https://github.com/str4d/librustzcash/tree/zcash_client_sqlite_ffi/zcash_client_sqlite/ffi |
[@pacu]
It does! This was referenced in mozilla/uniffi-rs (transitively via) https://github.com/mozilla/application-services. Seems like it could be a really good reference. Good find 👍! [@pacu]
Oh 💯 I definitely don't suggest dropping CocoaPods support. This actually ends up making CocoaPods support a lot easier as we can ditch the build script phase and use only vendored framework and sources on the podspec, I'll push up a commit with this if I can get some time today to dh-ecc/ZcashRustLib.xcframework [@str4d]
I'm definitely interested in this approach too, and we can indeed do this incrementally, first with C bindings then transitioning to uniffi 🙌 [@str4d]
Awesome! I'll check this out 👍 |
To anyone looking at this issue 2.5 years later, this Rust-less build has created significant problems for the Rust FFI development process, as well as greatly reducing the agility of the Swift SDK in response to Rust improvements. An alternative approach is being developed here: Electric-Coin-Company/zcash-light-client-ffi#96 |
@pacu has already done a Research Spike on this, but we would like more input.
The text was updated successfully, but these errors were encountered: