Skip to content

Add visionOS support - #682

Merged
jschwe merged 3 commits into
corrosion-rs:masterfrom
bruvzg:vision_os
Oct 10, 2026
Merged

jschwe merged 3 commits into
corrosion-rs:masterfrom
bruvzg:vision_os

Conversation

@bruvzg

@bruvzg bruvzg commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Mostly copy-pasted iOS code. Only tested as part of custom AccessKit build for Godot.

Comment thread .github/workflows/test.yaml Resolved
Comment thread .github/workflows/test.yaml Resolved
Comment thread .github/workflows/test.yaml Resolved
@jschwe

jschwe commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Looks like updating the actions helped fix the install cmake error in CI. Now I see the following error with the XCode generator:

warning: rust-host-program@0.1.0: cc: warning: using sysroot for 'MacOSX' but targeting 'XR' [-Wincompatible-sysroot]

Looks like there is still an issue with the hostbuild targetting visionOS, when it should be targetting the host. Interesting that ninja seems to be not affected...

bruvzg and others added 2 commits October 7, 2026 22:02
Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
@bruvzg

bruvzg commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

warning: rust-host-program@0.1.0: cc: warning: using sysroot for 'MacOSX' but targeting 'XR' [-Wincompatible-sysroot]

I'm getting the same error locally, with latest cmake and Xcode.

When building with the Xcode generator, Xcode exports
`XROS_DEPLOYMENT_TARGET` into the environment of the cargo invocation.
Older cc-rs versions pass an unversioned `--target=arm64-apple-darwin`
to clang when compiling for macOS, so clang picks up the deployment
target from the environment and compiles for visionOS instead, which
then fails to link into the host binary.
@jschwe
jschwe marked this pull request as ready for review October 10, 2026 07:05

@jschwe jschwe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pushed a commit to fix the hostbuild failure. Thanks for the PR!

@jschwe
jschwe merged commit 34f645b into corrosion-rs:master Oct 10, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants