Skip to content

Commit 3e90528

Browse files
authored
Add Apple notification group (rust-lang#1964)
1 parent 98b188f commit 3e90528

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

src/doc/rustc-dev-guide/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
- [Using external repositories](./external-repos.md)
5151
- [Fuzzing](./fuzzing.md)
5252
- [Notification groups](notification-groups/about.md)
53+
- [Apple](notification-groups/apple.md)
5354
- [ARM](notification-groups/arm.md)
5455
- [Cleanup Crew](notification-groups/cleanup-crew.md)
5556
- [LLVM](notification-groups/llvm.md)

src/doc/rustc-dev-guide/src/notification-groups/about.md

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ search for existing issues that haven't been claimed yet.
1919
## List of notification groups
2020

2121
Here's the list of the notification groups:
22+
- [Apple](./apple.md)
2223
- [ARM](./arm.md)
2324
- [Cleanup Crew](./cleanup-crew.md)
2425
- [LLVM](./llvm.md)
@@ -57,6 +58,7 @@ cargo run add-person $your_user_name
5758

5859
Example PRs:
5960

61+
* [Example of adding yourself to the Apple group.](https://github.com/rust-lang/team/pull/1434)
6062
* [Example of adding yourself to the ARM group.](https://github.com/rust-lang/team/pull/358)
6163
* [Example of adding yourself to the Cleanup Crew.](https://github.com/rust-lang/team/pull/221)
6264
* [Example of adding yourself to the LLVM group.](https://github.com/rust-lang/team/pull/140)
@@ -70,6 +72,7 @@ To tag an issue as appropriate for a notification group, you give
7072
group. For example:
7173

7274
```text
75+
@rustbot ping apple
7376
@rustbot ping llvm
7477
@rustbot ping cleanup-crew
7578
@rustbot ping windows
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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

Comments
 (0)