Test and fix iOS#5158
Conversation
2d10ab7 to
f222bd7
Compare
| pub fn proc_listpgrppids(pgrpid: crate::pid_t, buffer: *mut c_void, buffersize: c_int) | ||
| -> c_int; | ||
| pub fn proc_listchildpids(ppid: crate::pid_t, buffer: *mut c_void, buffersize: c_int) -> c_int; | ||
| pub fn proc_pidinfo( |
There was a problem hiding this comment.
cfg-gating the sys/proc_info.h stuff will mean the sysinfo crate will no longer compile on iOS/tvOS/watchOS/visionOS, CC @GuillaumeGomez, but it was probably broken before? At least unlikely that actually using these symbols it would get through the App Store.
There was a problem hiding this comment.
As far as I know, people using sysinfo on iOS/App store have access to these functions. Would be nice to have a confirmation though as I can't do it myself.
There was a problem hiding this comment.
Do you know who's using sysinfo on iOS? I guess I know that Bevy uses it, so perhaps it's fine, though that might also just be because that code-path is unused (and thus not present in the final binary).
Anyhow, I suspect it's just ProcessInner::open_files that'll need to be gated as macOS-only.
There was a problem hiding this comment.
Sometimes people open issues/PRs to fix iOS/App store builds but we'd need to go through PRs/issues to find the users. ^^'
These are not available on iOS, tvOS, watchOS and visionOS.
f222bd7 to
5d33927
Compare
| if: matrix.cargo-apple-runner | ||
| uses: taiki-e/install-action@0631aa6515c7d545823c67cfae7ef4fc7f490154 # v2.81.8 | ||
| with: | ||
| tool: cargo-apple-runner |
There was a problem hiding this comment.
Unsure if this is how you'll want this to be installed?
| - target: aarch64-apple-ios-sim | ||
| os: macos-26 | ||
| cargo-apple-runner: true | ||
| simulator: "iPhone 17" | ||
| env: { CARGO_TARGET_AARCH64_APPLE_IOS_SIM_RUNNER: cargo-apple-runner } |
There was a problem hiding this comment.
We could add tests for tvOS, watchOS and visionOS here too, if you'd like?
5d33927 to
3297d7a
Compare
|
CI is broken, not sure it's my fault? |
Description
Enable testing on iOS using
cargo-apple-runner, a tool I maintain for making it easier to run binaries on the iOS/tvOS/watchOS/visionOS simulator.This reveals a bunch of places where we exposed symbols that are not actually available on iOS, I've
cfg-gated those as#[cfg(target_os = "macos")].Fixes #1054.
Checklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI