fix: building for watchOS arm64_32-apple-watchos target#2702
fix: building for watchOS arm64_32-apple-watchos target#2702setoelkahfi wants to merge 2 commits intobriansmith:mainfrom
arm64_32-apple-watchos target#2702Conversation
briansmith
left a comment
There was a problem hiding this comment.
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 brian@briansmith.org; would love to chat about what you're doing on watchOS with ring. (Not a sales call, I promise.)
| @@ -35,7 +35,6 @@ mod abi_assumptions { | |||
| // 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.
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.
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.
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.