-
Notifications
You must be signed in to change notification settings - Fork 778
fix: building for watchOS arm64_32-apple-watchos target
#2702
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
base: main
Are you sure you want to change the base?
Conversation
briansmith
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, thanks for all your effort on testing this.
I have to admit that both I don't have time to properly test on watchOS, and this is in conflict with my general policies regarding untested configurations, so we'll need to compromise.
In the commit message, could you describe which features you tested and/or have used in this configuration. e.g. "AES-GCM," "RSA verification," "RSA signing, "X25519 key agreement," "P-256 signing," "P-256 verification," etc. That would help us understand what has actually been exercised.
Note that the P-256 and X25519 code could be tweaked in this configuration to make them much smaller on the device. They currently use large tables of constants as an optimization, but that optimization is optional. Something to consider for the future.
I would love it if you could shoot me an email at [email protected]; would love to chat about what you're doing on watchOS with ring. (Not a sales call, I promise.)
| // to a not-yet-existing 64-bit "zero-extended pointer" type, and change | ||
| // every other <64-bit parameter type to the corresponding 64-bit type. | ||
| const _ASSUMED_POINTER_SIZE: usize = | ||
| if cfg!(all(target_os = "watchos", target_pointer_width = "32")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest changing this to:
if cfg!(all(target_os = "watchos", target_pointer_width = "32", feature = "untested-arm64_32-watchos")) {
Then add the feature in Cargo.toml and update the GitHub Actions to add the feeture flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, it's our transitive dependency. It's some level down in our dependency tree.
We are currently having an issue running our Rust native code on watchOS device. Could or couldn't be related with this but that's we're gonna focus on right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is most likely because I compiled the Rust XCFramework with watchos11.5 SDK that is shipped with the XCode 16.4 that I'm using. But the watchOS app itself targets minimum watchOS 9.6, so there's a missmatch between SDK and runtime target. I'll try compiling the Rust library with XCode 14.3 that includes watchos9.4 SDK that is required for building watchOS app targeting watchOS 9.6.
arm64_32-apple-watchos target
Revert #2650
Fix #2616
Tested with a simple crate.
Minimum deployment is watchOS 9. Will fail when targeting lower version of that.