Repository navigation
Test and fix iOS - #5158
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. ^^'
There was a problem hiding this comment.
I filed GuillaumeGomez/sysinfo#1679, leaving the thread unresolved for reviewers to see.
f222bd7 to
5d33927
Compare
5d33927 to
3297d7a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
9edcebb to
999db32
Compare
This comment has been minimized.
This comment has been minimized.
999db32 to
0598978
Compare
0598978 to
4bfdbd8
Compare
|
Left some first pass feedback here, |
|
Reminder, once the PR becomes ready for a review, use |
These either don't exist in the iOS, tvOS, watchOS and visionOS SDKs, or are marked as unavailable on those platforms. (backport <rust-lang#5158>) (cherry picked from commit 00f55f6) [ needed a slightly unusual resolution due to 790e5c6 ("Remove removed items in OpenBSD") which isn't backported - Trevor ]
(backport <rust-lang#5158>) (cherry picked from commit 7f86676)
(backport <rust-lang#5158>) (cherry picked from commit 0f1943a)
(backport <rust-lang#5158>) (cherry picked from commit f3b2c50)
(backport <rust-lang#5158>) (cherry picked from commit c859fcc)
This makes it clearer where these overrides are required. There should be no functional changes here (since the only three architectures we support for macOS are x86, x86_64 and aarch64). (backport <rust-lang#5158>) (cherry picked from commit 6bf10ad)
This fixes: - The value of `FNM_PATHNAME` and `FNM_NOESCAPE` on iOS, tvOS, watchOS and visionOS. - `memmem` and `task_set_info` not being available on watchOS. - `sigqueue` not being available on iOS, tvOS, watchOS and visionOS. (backport <rust-lang#5158>) (cherry picked from commit e931965)
These either don't exist in the iOS, tvOS, watchOS and visionOS SDKs, or are marked as unavailable on those platforms. (backport <rust-lang#5158>) (cherry picked from commit 00f55f6) [ needed a slightly unusual resolution due to 790e5c6 ("Remove removed items in OpenBSD") which isn't backported - Trevor ]
(backport <rust-lang#5158>) (cherry picked from commit 7f86676)
(backport <rust-lang#5158>) (cherry picked from commit 0f1943a)
(backport <rust-lang#5158>) (cherry picked from commit f3b2c50)
(backport <rust-lang#5158>) (cherry picked from commit c859fcc)
The `SYSPROTO_EVENT` and `SYSPROTO_CONTROL` constants are only available on macOS, see rust-lang/libc#5158.
The `AF_SYS_CONTROL` constant is only available on macOS, see rust-lang/libc#5158.
* ci: add web-sys pin * Import statx_flags from linux_raw_sys explicitly to avoid libc conflicts * Gate sysproto module to macOS The `SYSPROTO_EVENT` and `SYSPROTO_CONTROL` constants are only available on macOS, see rust-lang/libc#5158. * Gate `AF_SYS_CONTROL` to macos The `AF_SYS_CONTROL` constant is only available on macOS, see rust-lang/libc#5158. * Return `NOSYS` from `utimensat` on tvOS and watchOS tvOS and watchOS do not provide `fork`, so the `utimensat` fallback cannot be implemented on these platforms. Return `NOSYS` instead.
…rk compile again libc 0.2.190 stopped exposing macOS-only API on iOS (rust-lang/libc#5158). netdev 0.46.3, underneath iroh by way of netwatch, still uses one of those items, `in6_ifreq`, on every Apple target, so with 0.2.190 in the lock the aarch64-apple-ios and aarch64-apple-ios-sim slices fail to compile and the Apple build and Swift smoke job is red. netdev 0.46.2 has the same code, so holding netdev back does not help; libc is the release to hold. Cargo.toml now bounds libc to =0.2.189 on Apple targets, which bounds the lock everywhere, so a later `cargo update` or Update dependencies run keeps it. Dependabot ignores libc >= 0.2.190 for the same reason. Both come out once netdev ships a release that builds for iOS against a newer libc.
… its range allows (#51) * chore(deps): the lock resolves every dependency to the newest version its range allows allocator-api2 0.2.21 -> (none) async-trait 0.1.92 -> (none) bitflags 2.13.1 -> 2.13.2 camino 1.2.5 -> 1.2.6 cc 1.4.5 -> 1.6.0 cfg-if 1.0.4 -> 1.0.5 clap 4.6.6 -> 4.6.7 clap_builder 4.6.6 -> 4.6.7 clap_derive 4.6.4 -> 4.6.7 clap_lex 1.1.0 -> 1.1.1 core-foundation 0.9.4 -> (none) critical-section 1.2.0 -> (none) crossbeam-channel 0.5.17 -> (none) crossbeam-epoch 0.9.21 -> (none) crossbeam-utils 0.8.23 -> (none) ctutils 0.4.2 -> 0.4.3 either 1.18.0 -> (none) find-msvc-tools 0.1.12 -> 0.1.14 fs-err 3.3.1 -> 3.3.2 generator 0.8.9 -> 0.8.10 h2 0.4.19 -> 0.4.20 hickory-net 0.26.2 -> (none) hickory-proto 0.26.2 -> (none) hickory-resolver 0.26.2 -> (none) hybrid-array 0.4.14 -> 0.4.15 hyper 1.11.1 -> 1.12.0 hyper-rustls 0.27.9 -> 0.27.10 hyper-util 0.1.20 -> 0.1.21 iroh 1.1.0 -> 1.3.0 iroh-base 1.1.0 -> 1.3.0 iroh-dns 1.1.0 -> 1.3.0 iroh-metrics 1.0.1 -> 1.0.2 iroh-relay 1.1.0 -> 1.3.0 js-sys 0.3.105 -> 0.3.106 lazy_static 1.5.0 -> 1.5.1 libc 0.2.189 -> 0.2.190 lock_api 0.4.14 -> (none) lru 0.18.4 -> 0.18.5 lru-slab 0.1.2 -> 0.1.3 mio 1.2.3 -> 1.2.4 modelpipe 0.8.3 -> 0.8.5 moka 0.12.16 -> (none) n0-dns-resolver (none) -> 0.1.0 netdev 0.46.2 -> 0.46.3 noq 1.2.0 -> 1.3.0 noq-proto 1.2.0 -> 1.3.0 noq-udp 1.2.0 -> 1.3.0 objc2 0.6.4 -> 0.6.5 parking_lot 0.12.5 -> (none) parking_lot_core 0.9.12 -> (none) powerfmt 0.2.0 -> 0.2.1 prefix-trie 0.8.4 -> (none) rand 0.10.2 -> 0.10.3 redox_syscall 0.5.18 -> (none) reqwest 0.13.4 -> 0.13.5 resolv-conf 0.7.6 -> (none) rustix 1.1.4 -> 1.1.5 rustls 0.23.44 -> 0.23.45 rustls-platform-verifier 0.7.0 -> 0.7.1 rustls-platform-verifier-android 0.1.1 -> 0.2.0 scopeguard 1.2.0 -> (none) serde_spanned 1.1.1 -> 1.1.2 siphasher 1.0.3 -> 1.0.4 smallvec 1.16.0 -> 1.16.2 spki 0.8.0 -> 0.8.1 syn 3.0.5 -> 3.0.6 synstructure 0.13.2 -> 0.14.0 system-configuration 0.7.0 -> 0.8.0 tagptr 0.2.0 -> (none) textwrap 0.16.2 -> 0.16.4 thiserror 2.0.20 -> 2.0.21 thiserror-impl 2.0.20 -> 2.0.21 tinyvec 1.13.2 -> 1.13.3 tinyvec_macros 0.1.1 -> (none) tokio-rustls 0.26.5 -> 0.26.6 toml 1.1.5+spec-1.1.0 -> 1.1.7+spec-1.1.0 toml_datetime 1.1.1+spec-1.1.0 -> 1.1.2+spec-1.1.0 toml_edit 0.25.13+spec-1.1.0 -> 0.25.16+spec-1.1.0 toml_parser 1.1.3+spec-1.1.0 -> 1.1.4+spec-1.1.0 toml_writer 1.1.2+spec-1.1.0 -> 1.1.3+spec-1.1.0 unicode-ident 1.0.24 -> 1.0.26 unicode-width (none) -> 0.2.2 uuid 1.26.0 -> (none) want 0.3.1 -> 0.3.2 wasm-bindgen 0.2.128 -> 0.2.129 wasm-bindgen-futures 0.4.78 -> 0.4.79 wasm-bindgen-macro 0.2.128 -> 0.2.129 wasm-bindgen-macro-support 0.2.128 -> 0.2.129 wasm-bindgen-shared 0.2.128 -> 0.2.129 web-sys 0.3.105 -> 0.3.106 yoke-derive 0.8.2 -> 0.8.4 zerocopy 0.8.56 -> 0.8.62 zerocopy-derive 0.8.56 -> 0.8.62 zerofrom-derive 0.1.7 -> 0.1.8 zeroize 1.9.0 -> 1.9.1 * fix(deps): libc stays at 0.2.189, so both iOS slices of the XCFramework compile again libc 0.2.190 stopped exposing macOS-only API on iOS (rust-lang/libc#5158). netdev 0.46.3, underneath iroh by way of netwatch, still uses one of those items, `in6_ifreq`, on every Apple target, so with 0.2.190 in the lock the aarch64-apple-ios and aarch64-apple-ios-sim slices fail to compile and the Apple build and Swift smoke job is red. netdev 0.46.2 has the same code, so holding netdev back does not help; libc is the release to hold. Cargo.toml now bounds libc to =0.2.189 on Apple targets, which bounds the lock everywhere, so a later `cargo update` or Update dependencies run keeps it. Dependabot ignores libc >= 0.2.190 for the same reason. Both come out once netdev ships a release that builds for iOS against a newer libc. --------- Co-authored-by: mmogr <172192206+mmogr@users.noreply.github.com>
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")].I have marked this as
stable-nominated, because I tend to think it fits there even though it's breaking, but we should definitely wait untilsysinfohas gotten a release with this fixed, and wait until said release has gotten more popular.Fixes #1054.
Checklist
libc-test/semverhave been updated*LASTor*MAXare included (see #3131)