|
| 1 | +# Apple notification group |
| 2 | + |
| 3 | +**Github Labels:** [O-macos], [O-ios], [O-tvos], [O-watchos] and [O-visionos] <br> |
| 4 | +**Ping command:** `@rustbot ping apple` |
| 5 | + |
| 6 | +This list will be used to ask for help both in diagnosing and testing |
| 7 | +Apple-related issues as well as suggestions on how to resolve interesting |
| 8 | +questions regarding our macOS/iOS/tvOS/watchOS/visionOS support. |
| 9 | + |
| 10 | +To get a better idea for what the group will do, here are some examples of the |
| 11 | +kinds of questions where we would have reached out to the group for advice in |
| 12 | +determining the best course of action: |
| 13 | + |
| 14 | +* Raising the minimum supported versions (e.g. [#104385]) |
| 15 | +* Additional Apple targets (e.g. [#121419]) |
| 16 | +* Obscure Xcode linker details (e.g. [#121430]) |
| 17 | + |
| 18 | +[O-macos]: https://github.com/rust-lang/rust/labels/O-macos |
| 19 | +[O-ios]: https://github.com/rust-lang/rust/labels/O-ios |
| 20 | +[O-tvos]: https://github.com/rust-lang/rust/labels/O-tvos |
| 21 | +[O-watchos]: https://github.com/rust-lang/rust/labels/O-watchos |
| 22 | +[O-visionos]: https://github.com/rust-lang/rust/labels/O-visionos |
| 23 | +[#104385]: https://github.com/rust-lang/rust/pull/104385 |
| 24 | +[#121419]: https://github.com/rust-lang/rust/pull/121419 |
| 25 | +[#121430]: https://github.com/rust-lang/rust/pull/121430 |
| 26 | + |
| 27 | +## Deployment targets |
| 28 | + |
| 29 | +Apple platforms have a concept of "deployment target", controlled with the |
| 30 | +`*_DEPLOYMENT_TARGET` environment variables, and specifies the minimum OS |
| 31 | +version that a binary runs on. |
| 32 | + |
| 33 | +Using an API from a newer OS version in the standard library than the default |
| 34 | +that `rustc` uses will result in either a static or a dynamic linker error. |
| 35 | +For this reason, try to suggest that people document on `extern "C"` APIs |
| 36 | +which OS version they were introduced with, and if that's newer than the |
| 37 | +current default used by `rustc`, suggest to use weak linking. |
| 38 | + |
| 39 | +## The App Store and private APIs |
| 40 | + |
| 41 | +Apple are very protective about using undocumented APIs, so it's important |
| 42 | +that whenever a change uses a new function, that they are verified to actually |
| 43 | +be public API, as even just mentioning undocumented APIs in the binary |
| 44 | +(without calling it) can lead to rejections from the App Store. |
| 45 | + |
| 46 | +For example, Darwin / the XNU kernel actually has futex syscalls, but we can't |
| 47 | +use them in `std` because they are not public API. |
| 48 | + |
| 49 | +In general, for an API to be considered public by Apple, it has to: |
| 50 | +- Appear in a public header (i.e. one distributed with Xcode, and found for |
| 51 | + the specific platform under `xcrun --show-sdk-path --sdk $SDK`). |
| 52 | +- Have an availability attribute on it (like `__API_AVAILABLE`, |
| 53 | + `API_AVAILABLE` or similar). |
0 commit comments