-
Notifications
You must be signed in to change notification settings - Fork 1.1k
What is the minimum iOS version we target? #1406
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
Comments
AFAICT we can add the API here, but whether rust-random/getrandom should use it or not, depends on which iOS versions that crate wants to support. If it wants to support older versions, then it should probably query the iOS version and provide a workaround. Or in other words, libc does not guarantee that all provided APIs are available on all HOSTs of a particular platform. It is up to the users of libc to make sure that the APIs they are using are actually available on the HOSTs where their binaries run. |
The main reason I ask is that there is a proposal (rust-lang/rust#62082) to make |
That feels like it would be a libstd issue. One can probably use a atomic function pointer that is set on initialization to use different implementations depending on the iOS version. Doing that only requires relaxed atomic loads and stores. |
I'm closing this, since adding an API here just exposes the FFI wrapper. It has nothing to do with the minimum iOS version that libstd supports - that's up to libstd to decide, and that will determine whether they can use a certain API or not. |
As part of rust-random/getrandom#38 we are trying to figure out if we can reliably use the macOS/iOS
getentropy(2)
function (added in macOS 10.12 and iOS 10).The Rust Platform Support page has a minimum version for macOS (10.7) but not for iOS. Given that distribution of iOS installs is much better than that of macOS or Android, I think setting iOS 10 to be the minimum supported version would be reasonable.
If we do decide the that Rust's min iOS version is
>= 10
, we should at least add all the new libc functions added since then (includinggetentropy
).The text was updated successfully, but these errors were encountered: