Skip to content

Conversation

@setoelkahfi
Copy link

@setoelkahfi setoelkahfi commented Sep 14, 2025

Revert #2650
Fix #2616

Tested with a simple crate.

Minimum deployment is watchOS 9. Will fail when targeting lower version of that.

@setoelkahfi setoelkahfi changed the title revert 6442d865d0492712f5e51727c7a65c0f59dabba9 Revert #2650 Sep 14, 2025
@setoelkahfi setoelkahfi changed the title Revert #2650 Revert https://github.com/briansmith/ring/pull/2650 Sep 14, 2025
@setoelkahfi setoelkahfi changed the title Revert https://github.com/briansmith/ring/pull/2650 Revert #2650 Sep 14, 2025
Copy link
Owner

@briansmith briansmith left a 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")) {
Copy link
Owner

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.

Copy link
Author

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.

Copy link
Author

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.

@setoelkahfi setoelkahfi changed the title Revert #2650 fix: building for watchOS arm64_32-apple-watchos target Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail to build for watchOS arm64_32-apple-watchos from macOS 15 with XCode 16.4

2 participants