Skip to content

target: add arm64e-apple-visionos#155715

Closed
cypherair wants to merge 4 commits intorust-lang:mainfrom
cypherair:prep/upstream-ready-arm64e-visionos-target-2026-04-24-u9836b06
Closed

target: add arm64e-apple-visionos#155715
cypherair wants to merge 4 commits intorust-lang:mainfrom
cypherair:prep/upstream-ready-arm64e-visionos-target-2026-04-24-u9836b06

Conversation

@cypherair
Copy link
Copy Markdown
Contributor

@cypherair cypherair commented Apr 24, 2026

Add the arm64e-apple-visionos Tier 3 target.

This adds the target specification, rustc platform-support documentation, target table entry, rustc book summary entry, Mach-O target coverage, and the temporary stage0 missing-target allowance for arm64e-apple-visionos.

Dependency on #155716

arm64e-apple-visionos is not fully usable with this PR alone. Full std and program validation for this target depends on #155716, which adds the Apple arm64e pointer-authentication/codegen support needed for arm64e Mach-O objects.

Validation

On this branch alone:

git diff --check main...HEAD
python3 x.py check compiler/rustc_target --stage 1
On a temporary local validation branch based on main@9836b06 and containing only this PR plus #155716:

git diff --check main...HEAD
python3 x.py test --stage 1 --force-rerun tests/assembly-llvm/targets/targets-macho.rs
python3 x.py build compiler/rustc library/std --stage 1 --target arm64e-apple-visionos
compiled and linked a minimal Rust program for arm64e-apple-visionos with Xcode XROS26.4.sdk
compiled a simple C object with Apple clang -target arm64e-apple-xros2.0 and linked it into a Rust program for this target

I used Codex to help draft the PR.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 24, 2026

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 24, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 24, 2026

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, compiler
  • @ehuss, compiler expanded to 74 candidates
  • Random selection from 20 candidates

@madsmtm
Copy link
Copy Markdown
Contributor

madsmtm commented Apr 24, 2026

Please fill out the requirements for tier 3 targets from the target tier policy in the PR description. Also, did you use AI to create this PR? It stuck out to me that you placed arttet as target maintainer, even though they haven't agreed to that.

@madsmtm madsmtm self-assigned this Apr 24, 2026
@cypherair
Copy link
Copy Markdown
Contributor Author

I’m really sorry. I used Codex to create this PR and didn’t review it carefully enough before opening it. This PR incorrectly added a target maintainer without them agreeing to it. I’ll update the PR now.

The original version of this PR incorrectly added a target maintainer without them agreeing to it. I used Codex to create that version and did not review it carefully enough before opening it.

Correct the maintainer entry and update the Tier 3 target documentation.
@rust-log-analyzer

This comment has been minimized.

Add the trailing newline required by tidy.
@madsmtm madsmtm added the O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) label Apr 25, 2026
Copy link
Copy Markdown
Contributor

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m really sorry. I used Codex to create this PR and didn’t review it carefully enough before opening it. This PR incorrectly added a target maintainer without them agreeing to it. I’ll update the PR now.

That's okay, we all make mistakes, as long as you learn from them we're good ;).

Note that the Rust Project (welcome btw!) does not disallow LLM use, but we do require you to fully understand the work you're submitting. That goes for your other PRs as well - we have a limited amount of reviewer time available, so we need to make sure that this time is well spent.

I'd suggest you maybe go over those PRs as well with a bit finer comb, and maybe also make it clear to the reviewer that you've used AI to create them, and to what degree.

I hope that makes sense? Feel free to ask further questions if something is unclear!


The PR description also still needs to be updated with a description of how this target fulfills the the tier 3 target policy, similar to for example #148790 (though IMO that one is a bit brief). Could I also get you to remove the notice from the main PR description? And maybe clean it up a bit? It goes in the final merge commit, and it's not really relevant to the future.

Also, once you're done, could I get you to squash your changes?

View changes since this review


**Tier: 3**

Apple arm64e visionOS.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
Apple arm64e visionOS.
Apple ARM64e visionOS.

Comment on lines +13 to +17
This target is cross-compiled and supports `std`.

This target requires the visionOS SDK provided by Xcode.

The deployment target can be configured with `XROS_DEPLOYMENT_TARGET`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you refer to apple-visionos.md instead, similar to what's done in arm64e-apple-ios.md?

Comment thread src/doc/rustc/src/platform-support.md Outdated
[`arm64e-apple-darwin`](platform-support/arm64e-apple-darwin.md) | ✓ | ✓ | ARM64e Apple Darwin
[`arm64e-apple-ios`](platform-support/arm64e-apple-ios.md) | ✓ | | ARM64e Apple iOS
[`arm64e-apple-tvos`](platform-support/arm64e-apple-tvos.md) | ✓ | | ARM64e Apple tvOS
[`arm64e-apple-visionos`](platform-support/arm64e-apple-visionos.md) | ✓ | | arm64e Apple visionOS
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

Suggested change
[`arm64e-apple-visionos`](platform-support/arm64e-apple-visionos.md) | ✓ | | arm64e Apple visionOS
[`arm64e-apple-visionos`](platform-support/arm64e-apple-visionos.md) | ✓ | | ARM64e Apple visionOS

Comment thread src/bootstrap/src/core/sanity.rs Outdated
const STAGE0_MISSING_TARGETS: &[&str] = &[
// just a dummy comment so the list doesn't get onelined
];
const STAGE0_MISSING_TARGETS: &[&str] = &["arm64e-apple-visionos"];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Don't remove the comment.

@cypherair
Copy link
Copy Markdown
Contributor Author

I’m converting this PR back to draft.

This PR is target-spec plumbing, but its current std/program validation depends on #155716, which I’m re-checking separately. This PR also has issues of its own that I’m working on.

@cypherair cypherair marked this pull request as draft April 25, 2026 19:09
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 25, 2026
@cypherair
Copy link
Copy Markdown
Contributor Author

This PR proposed adding the arm64e-apple-visionos Tier 3 target. It adds the target specification for arm64e-apple-visionos.

However, its current std and program validation depends on #155716, and I am re-checking the scope of that work separately. In particular, some of the Apple arm64e pointer-authentication support may require upstream LLVM support rather than Rust-only changes.

Given that dependency, I plan to close this PR for now.

@cypherair
Copy link
Copy Markdown
Contributor Author

I’m closing this PR for now.

Thank you for taking the time to review it, and sorry for sending an immature PR for review before I had fully checked it.

@cypherair cypherair closed this Apr 25, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 25, 2026
@cypherair cypherair deleted the prep/upstream-ready-arm64e-visionos-target-2026-04-24-u9836b06 branch April 25, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-visionos Apple visionOS T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants