-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Proposal
Promote the following targets to Tier 2 without host tools:
aarch64-apple-tvos
.aarch64-apple-tvos-sim
.aarch64-apple-watchos
.aarch64-apple-watchos-sim
.aarch64-apple-visionos
.aarch64-apple-visionos-sim
.
These are very similar to the existing tier 2 aarch64-apple-ios
and aarch64-apple-ios-sim
targets.
I'm only proposing promoting the Aarch64 targets (and not e.g. x86_64-apple-tvos
), as Aarch64 is the only architecture that Apple officially supports (so I'm not certain we should add more x86 tier 2 targets, even though x86_64-apple-ios
is tier 2).
I believe it makes sense to do this now that I've gotten the main test suite to run on the simulator targets in rust-lang/rust#146762, and have seen the fairly limited amount of test failures (by far most of them expected). In the future, it'd be nice to also try running the test suite on real devices, though I don't expect that to reveal many issues.
Related: #761.
Tier 2 requirements
Copying from the tier 2 target policy (parts omitted for brevity):
- A tier 2 target must have value to people other than its maintainers.
The visionOS targets are used by several people, see the comments starting at rust-lang/rust#121419 (comment). tvOS and watchOS maybe slightly less so, but they're definitely still useful to others.
- A tier 2 target must have a designated team of developers. This team must have at least 2 developers.
All proposed targets have at least two maintainers:
aarch64-apple-tvos*
: @thomcc @madsmtmaarch64-apple-watchos*
: @deg4uss3r @vladimir-ea @leohowell @madsmtmaarch64-apple-visionos*
: @agg23 @madsmtm
- The target must not place undue burden on Rust developers not specifically concerned with that target.
tvOS and watchOS have more restrictions on process spawning, which means that parts of the test suite needs extra cfg
s. Other than that, there shouldn't be difficulties with these that aren't also present for the iOS targets.
- The target must provide documentation for the Rust community explaining how to build for the target using cross-compilation, and explaining how to run tests for the target.
Such documentation is provided at:
- https://doc.rust-lang.org/rustc/platform-support/apple-tvos.html
- https://doc.rust-lang.org/rustc/platform-support/apple-watchos.html
- https://doc.rust-lang.org/rustc/platform-support/apple-visionos.html
Do tell me if there's something in that which could be clearer!
- The target must document its baseline expectations [...]
OS requirements are documented on the platform support pages above.
- If introducing a new tier 2 or higher target that is identical to an existing Rust target except for the baseline expectations [...]
These targets have distinct OSes from existing targets.
- Tier 2 targets must not leave any significant portions of
core
or the standard library unimplemented or stubbed out
std
is supported to the same extent as iOS, with the exception of a few process-spawning APIs on tvOS and watchOS that are deliberately limited by the vendor.
- The code generation backend for the target should not have deficiencies that invalidate Rust safety properties
The code generation used for these targets is the same as that of iOS and macOS Aarch64. The only real difference is in the default target features (which are a bit higher on e.g. visionOS), and that the final Mach-O binary has a different LC_BUILD_VERSION
platform set.
- If the target supports C code, the Rust target must support that C calling convention for the platform via
extern "C"
.
These targets support extern "C"
.
- The target must build reliably in CI
These targets should build with the same reliability as the iOS targets.
- The approving teams may additionally require that a subset of tests pass in CI
Hmm, a smoke test might be useful, though I don't believe that running the full test suite in CI is that valuable (the value add is fairly small since these targets are so similar to iOS, and the cost of doing so is fairly high).
It would probably be more valuable to add iOS targets to CI.
- Building the target in CI must not take substantially longer than the current slowest target in CI, and should not substantially raise the maintenance burden of the CI infrastructure.
I do not believe they will.
- Tier 2 targets should, if at all possible, support cross-compiling
The targets support cross-compiling, though only officially from macOS hosts.
- [...] legal requirements [...]
The legal requirements of these targets are the same as for iOS.
- Tier 2 targets must not impose burden on the authors of pull requests, or other developers in the community, to ensure that tests pass for the target
Understood.
- The target maintainers should regularly run the testsuite for the target, and should fix any test failures in a reasonably timely fashion
rust-lang/rust#146762 made this possible on the simulator targets. I personally don't have access to the hardware for testing on real devices.
- All requirements for tier 3 apply.
The requirements for tier 3 are outlined in #642 for the visionOS targets, and in rust-lang/rust#95243 for the watchOS targets. The tvOS targets seem to not have gone through a similar process (?), but they do uphold all the requirements.
Process
The main points of the Major Change Process are as follows:
- File an issue describing the proposal.
- A compiler team member who is knowledgeable in the area can second by writing
@rustbot second
or kickoff a team FCP with@rfcbot fcp $RESOLUTION
.- Refer to Proposals, Approvals and Stabilization docs for when a second is sufficient, or when a full team FCP is required.
- Once an MCP is seconded, the Final Comment Period begins.
- Final Comment Period lasts for 10 days after all outstanding concerns are solved.
- Outstanding concerns will block the Final Comment Period from finishing. Once all concerns are resolved, the 10 day countdown is restarted.
- If no concerns are raised after 10 days since the resolution of the last outstanding concern, the MCP is considered approved.
You can read more about Major Change Proposals on forge.