-
Notifications
You must be signed in to change notification settings - Fork 16
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
Figure out an alternative way to handle the Rust components used by ZcashLightClientKit #96
Comments
I just updated a clone of this repository that was previously at 0.3.1, and is now at 0.4.0:
|
Target | 0.3.1 (MiB) | 0.4.0 (MiB) | Increase |
---|---|---|---|
ios-arm64 |
26.11 | 45.44 | 74.0% |
ios-arm64_x86_64-simulator |
40.97 | 67.77 | 65.4% |
macos-arm64_x86_64 |
20.35 | 31.58 | 55.2% |
This is definitely unsustainable. It also interferes with the ability to use ZcashLightClientKit
as a Swift library (because this dependency hard-codes Apple-specific binaries).
The current architecture is:
If we keep the
The other thing the documentation says is that binary targets are only available on Apple platforms, so if we do want to enable |
Something else that the large binaries cause problems with:
This makes development of the Rust FFI untenable: I cannot be wiping away my local repo every time a new release occurs, destroying all of my local stashed changes and in-progress branches. |
I don't think there is much sense to do this at the moment since the use case would be that a server-side Swift application actually uses it. A Linux user probably has a much better developer experience with the Kotlin SDK than with the swift one because of the nature of how Swift for Linux is supported. Also, I created an issue for a matter that will be discussed tomorrow about better supporting React native wallets by bringing cocoapods back. Electric-Coin-Company/zcash-swift-wallet-sdk#1386. This specific workflow
along with the cocoapods one could be automated to be lessen of a burden to the development team. |
Some literature about this problem we are having that could be useful to us (and mostly EDGE) |
This might be of interest for @str4d and @nuttycom I'm working on the frost-swift-sdk PoC , which is a swift + uniffi thing. There are myriad of problems around the release of stuff, because I don't know how to combine a monorepo and github releases. people from Eiger actually created a separate repo for the Swift code and did a bunch of CI magic with gihub actions to push the swift code from their uniffi actions to their swift flavor demo. pretty cool, but also awful and unsustainable. Anyhow I found a couple of things: https://github.com/antoniusnaumann/cargo-swift/ which is a cargo plugin that works with uniffi to create a swift package out of it. https://github.com/segment-integrations/swift-create-xcframework |
I've now seen evidence of my issue with repo corruption (#96 (comment)) occurring in a downstream developer's Xcode while they were attempting to build Zashi iOS. |
The sizes of the binaries in this repo have been slowly growing over time. GitHub warns if any binary artifact in a commit is over 50 MiB, which the simulator artifact is, and GitHub rejects any commit containing a binary artifact over 100 MiB, which the simulator artifact is when compiling with ThinLTO.
We will need to figure out an alternative strategy for handling these binary artifacts. If/when we move to using UniFFI instead of the manual FFI in this repo, then this repo will be purely a cache of the binary artifacts, so we may be able to cache them in a different way.
The text was updated successfully, but these errors were encountered: