-
Notifications
You must be signed in to change notification settings - Fork 710
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
Add apple tvos support #1689
Add apple tvos support #1689
Conversation
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.
Thanks.
src/ec/curve25519/x25519.rs
Outdated
@@ -100,7 +100,7 @@ fn x25519_ecdh( | |||
let peer_public_key: &[u8; PUBLIC_KEY_LEN] = peer_public_key.as_slice_less_safe().try_into()?; | |||
|
|||
#[cfg_attr( | |||
not(all(not(target_os = "ios"), target_arch = "arm")), | |||
not(all(not(target_os = "ios"), not(target_os = "tvos"), target_arch = "arm")), |
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.
tvos is aarch64-only, right? If so then you don't need the changes in this file, because this is for target_ach = "arm" (32-bit ARM).
Does Apple have a 32-bit ARM TVOS toolchain? If so maybe we should just put something like this in lib.rs:
const _ONLY_64_BIT_TVOS: () = assert!(cfg!(any(target_pointer_width = "64", not(target_os = "tv_os")));
Note that macos
is not in this list because there's no 32-bit ARM macOS (AFAIK).
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.
(came here from the cc PR about tvOS as well)
There's the x86_64 tvOS target, although its just for the simulator running on a Intel Mac host. Rust doesn't support the original Apple TV, which is the only physical one to ever use an x86 chip.
Note that macos is not in this list because there's no 32-bit ARM macOS (AFAIK).
this is correct though
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.
tvos is aarch64-only, right? If so then you don't need the changes in this file, because this is for target_ach = "arm" (32-bit ARM).
Correct, I have overlooked it, will restore this file.
302f0de
to
c4ead82
Compare
Codecov Report
@@ Coverage Diff @@
## main #1689 +/- ##
=======================================
Coverage 95.97% 95.97%
=======================================
Files 134 134
Lines 19980 19980
Branches 199 199
=======================================
+ Hits 19175 19176 +1
Misses 767 767
+ Partials 38 37 -1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This PR allows using ring lib to target tier 3 *-apple builds: