Skip to content

feat(watchos): target arm64 (aarch64-apple-watchos) for device builds#5034

Merged
proggeramlug merged 2 commits into
mainfrom
fix/watchos-arm64-device
Jun 12, 2026
Merged

feat(watchos): target arm64 (aarch64-apple-watchos) for device builds#5034
proggeramlug merged 2 commits into
mainfrom
fix/watchos-arm64-device

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Why

Real-watch builds (--target watchos) have never linked: the device triple was arm64_32-apple-watchos, and Perry's NaN-boxed value representation (48-bit pointer masks, tags in the high 16 bits of a 64-bit word) fundamentally requires 64-bit usizeperry-runtime doesn't even compile for arm64_32 ("literal out of range for usize" in value.rs).

watchOS 26 moved S9-and-later watches to full arm64, so a 64-bit device target now exists. Apple also requires arm64 for all new watchOS App Store submissions since July 2025.

What

  • Device triple: arm64_32-apple-watchosaarch64-apple-watchos (codegen helpers + native-lib target mapping)
  • Swift/linker triples: arm64_32-apple-watchos10.0arm64-apple-watchos26.0 (link, platform_cmd, watchos-widget)
  • Watch bundle MinimumOSVersion: 26.0 for device builds (simulator keeps 10.0)
  • Updated the missing-lib hint to the nightly -Z build-std invocation the tier-3 target needs

Validation

Built a real game (Bloom Jump) end to end: perry-runtime + perry-ui-watchos via nightly build-std for aarch64-apple-watchos, game compiled/linked with --features watchos-swift-app, produced a Mach-O platform WATCHOS minos 26.0 arm64 executable, signed and accepted by App Store Connect (uploaded as a watch-only app, processing).

Notes

  • aarch64-apple-watchos is a tier-3 Rust target: runtime libs need cargo +nightly build -Z build-std=std,panic_abort. Worth wiring into release-packages.yml so PERRY_RUNTIME_DIR users get prebuilt .a files.
  • App Store validation additionally demands MinimumOSVersion >= 27.0 for arm64-only watch apps (below that an arm64_32 slice is mandatory). 26.0 is kept here because it allows Xcode dev-installs on S9+ watches running watchOS 26; store packaging can re-stamp with vtool -set-build-version watchos 27.0. Could alternatively make this a perry.toml knob — happy to follow up.
  • Watch-only App Store packaging needs an iOS stub wrapper (separate concern from this PR; perry publish watchos support could build on this).

Ralph Küpper and others added 2 commits June 12, 2026 09:11
arm64_32 cannot host Perry's NaN-boxed values (48-bit pointer tags need
64-bit usize), so real-watch builds never linked. watchOS 26 moved S9+
watches to full arm64, making the device target viable: swap the device
triple to aarch64-apple-watchos, Swift/linker triples to
arm64-apple-watchos26.0, and raise the watch bundle MinimumOSVersion
accordingly (simulator keeps 10.0).

Note: App Store submissions additionally require MinimumOSVersion >= 27.0
for arm64-only watch apps (arm64_32 slice mandatory below that).
@proggeramlug proggeramlug merged commit a46ca1d into main Jun 12, 2026
13 checks passed
@proggeramlug proggeramlug deleted the fix/watchos-arm64-device branch June 12, 2026 12:18
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.

1 participant