Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document minimum supported versions for apple operating systems to platform documentation #124215

Closed
simlay opened this issue Apr 21, 2024 · 3 comments · Fixed by #124772
Closed
Assignees
Labels
O-ios Operating system: iOS O-macos Operating system: macOS O-tvos Operating system: tvOS (including simulator) O-visionos Apple visionOS O-watchos Operating System: watchOS T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@simlay
Copy link
Contributor

simlay commented Apr 21, 2024

In #124089 (review), it was pointed out that there's not an easy way to know the minimum version of an apple OS that is supported. One must kind of grep for *_DEPLOYMENT_TARGET and then parse the output to retrieve an answer and get an answer.

If I read the source correctly, the minimum supported versions currently are:

The versions are occasionally bumped up as in rust-lang/compiler-team#556 and so it would be good write them down in a more human readable form.

This has lead to various code comments about version support for various platforms being a little inconsistent. It is possible this comment is to mean "minimum version of this syscall" but that is unclear.

I will admit that I'm not certain as to the best way to do this. Adding these to the platform support docs seems like the right choice. Perhaps also in the specific platform support page

Some of the tier 3 pages list a minimum and some do not. arm64e-apple-ios for example lists 12.0+ and arm64e-apple-darwin lists 11+ however watchOS and tvOS do not.

Perhaps related: I am unfamiliar with target triples arm64e-apple-ios and arm64e-apple-darwin. Are these actually used?

CC: @madsmtm

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 21, 2024
@madsmtm
Copy link
Contributor

madsmtm commented Apr 21, 2024

We give the arm64e-apple-* triples a higher default deployment target since the hardware is only supported on those newer OS versions. It's technically the same story with x86_64h-apple-darwin, although there the version is macOS 10.8, which is lower than the minimum Rust already requires.

I think it's a good idea to add to the platform support docs, I was considering splitting it into the following pages / "categories":

  • *-apple-darwin
  • *-apple-ios
  • *-apple-tvos
  • *-apple-watchos
  • *-apple-visionos
  • *-apple-ios-macabi (Mac Catalyst is sufficiently different from iOS that it makes sense to document it separately)
  • x86_64h-apple-darwin (Documents only the things relating to x86_64h, links to *-apple-darwin for the rest)
  • arm64e-apple-* (Same idea as above)

Do you think that's a good idea? In any case, I'd like to do this work:
@rustbot claim

CC @Nilstrieb who is working on target docs
CC @thomcc

@rustbot label O-macos O-ios O-tvos O-watchos O-visionos

@rustbot rustbot added O-ios Operating system: iOS O-macos Operating system: macOS O-tvos Operating system: tvOS (including simulator) O-visionos Apple visionOS O-watchos Operating System: watchOS labels Apr 21, 2024
@madsmtm
Copy link
Contributor

madsmtm commented Apr 21, 2024

Related: cc might soon require setting the deployment target when cross-compiling these platforms from non-macOS, so maybe it makes sense to have a top-level *-apple-* page explaining these targets in general, including cross compilation stuff?

@saethlin saethlin added T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 21, 2024
@Noratrieb
Copy link
Member

The platform support docs are the right place for this, yes. I think adding it to the platform support docs and then also leaving a comment next to them linking to DEPLOYMENT_TARGET and the other way around should ensure that they stay in sync.

@bors bors closed this as completed in 4a4883b May 21, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 21, 2024
Rollup merge of rust-lang#124772 - madsmtm:apple-platform-support-docs, r=oli-obk

Refactor documentation for Apple targets

Refactor the documentation for Apple targets in `rustc`'s platform support page to make it clear what the supported OS version is and which environment variables are being read (`*_DEPLOYMENT_TARGET` and `SDKROOT`). This fixes rust-lang#124215.

Note that I've expanded the `aarch64-apple-ios-sim` maintainers `@badboy` and `@deg4uss3r` to include being maintainer of all `*-apple-ios-*` targets. If you do not wish to be so, please state that, then I'll explicitly note that in the docs.

Additionally, I've added myself as co-maintainer of most of these targets.

r? `@thomcc`

I think the documentation you've previously written on tvOS is great, have mostly modified it to have a more consistent formatting with the rest of the Apple target.

I recognize that there's quite a few changes here, feel free to ask about any of them!

---

CC `@simlay` `@Nilstrieb`

`@rustbot` label O-apple
RalfJung pushed a commit to RalfJung/miri that referenced this issue May 22, 2024
Refactor documentation for Apple targets

Refactor the documentation for Apple targets in `rustc`'s platform support page to make it clear what the supported OS version is and which environment variables are being read (`*_DEPLOYMENT_TARGET` and `SDKROOT`). This fixes rust-lang/rust#124215.

Note that I've expanded the `aarch64-apple-ios-sim` maintainers `@badboy` and `@deg4uss3r` to include being maintainer of all `*-apple-ios-*` targets. If you do not wish to be so, please state that, then I'll explicitly note that in the docs.

Additionally, I've added myself as co-maintainer of most of these targets.

r? `@thomcc`

I think the documentation you've previously written on tvOS is great, have mostly modified it to have a more consistent formatting with the rest of the Apple target.

I recognize that there's quite a few changes here, feel free to ask about any of them!

---

CC `@simlay` `@Nilstrieb`

`@rustbot` label O-apple
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue May 24, 2024
Refactor documentation for Apple targets

Refactor the documentation for Apple targets in `rustc`'s platform support page to make it clear what the supported OS version is and which environment variables are being read (`*_DEPLOYMENT_TARGET` and `SDKROOT`). This fixes rust-lang/rust#124215.

Note that I've expanded the `aarch64-apple-ios-sim` maintainers `@badboy` and `@deg4uss3r` to include being maintainer of all `*-apple-ios-*` targets. If you do not wish to be so, please state that, then I'll explicitly note that in the docs.

Additionally, I've added myself as co-maintainer of most of these targets.

r? `@thomcc`

I think the documentation you've previously written on tvOS is great, have mostly modified it to have a more consistent formatting with the rest of the Apple target.

I recognize that there's quite a few changes here, feel free to ask about any of them!

---

CC `@simlay` `@Nilstrieb`

`@rustbot` label O-apple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-ios Operating system: iOS O-macos Operating system: macOS O-tvos Operating system: tvOS (including simulator) O-visionos Apple visionOS O-watchos Operating System: watchOS T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants