I have tested this in the simulator and on the device I had lying around, a 1st generation iPad Mini (which isn't Aarch64, but shows that the sysctlbyname calls still work even there, even if they return false).
Also, the standard library will use sysctl soon anyhow, see https://github.com/rust-lang/rust/pull/129019, so if the standard library starts getting rejected by Apple, it won't be entirely stdarch's fault.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) some time within the next two weeks.
This was originally added in https://github.com/rust-lang/stdarch/pull/1516.
I have tested this in the simulator and on the device I had lying around, a 1st generation iPad Mini (which isn't Aarch64, but shows that the
sysctlbyname
calls still work even there, even if they return false).sysctlbyname
should be safe to use without causing rejections from the app store, as its usage is documented in: https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristicsAlso, the standard library will use
sysctl
soon anyhow, see https://github.com/rust-lang/rust/pull/129019, so if the standard library starts getting rejected by Apple, it won't be entirelystdarch
's fault.A few more references: