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

Add Apple visionOS support #2621

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

QuentinPerez
Copy link
Contributor

👋

A small PR to support VisionOS. As it's a tier 3 toolchain, you'll need to build and host the standard library. Below is an example demonstrating the use of the rust_repository_set rule to configure the toolchain.

rust_repository_set(
    name = "aarch64_apple_visionos_on_aarch64_apple_darwin",
    edition = "2024",
    exec_triple = "aarch64-apple-darwin",
    extra_target_triples = {
        "aarch64-apple-visionos": [
            "@platforms//os:visionos",
            "@platforms//cpu:arm64",
            "@build_bazel_apple_support//constraints:apple",
            "@build_bazel_apple_support//constraints:device",
        ],
        "aarch64-apple-visionos-sim": [
            "@platforms//os:visionos",
            "@platforms//cpu:arm64",
            "@build_bazel_apple_support//constraints:apple",
            "@build_bazel_apple_support//constraints:simulator",
        ],
    },
    urls = ["URLS_TO_YOUR_RUST_STD"],
)

Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Thanks!

@QuentinPerez
Copy link
Contributor Author

can we merge it ?

@UebelAndre
Copy link
Collaborator

It looks like there’s some build failures that will need to be addressed first

@QuentinPerez
Copy link
Contributor Author

It looks like there’s some build failures that will need to be addressed first

You're right, I missed that one! I think we should not be able to merge it as long as the target isn't available on stable.

Caused by:
  process didn't exit successfully: `/private/var/tmp/_bazel_quentinperez/5845dd8b2f37c7097e5eb050b26837b8/external/rust_darwin_aarch64__aarch64-apple-darwin__stable_tools/bin/rustc - --crate-name ___ --print=file-names --target aarch64-apple-visionos --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
  --- stderr
  error: Error loading target specification: Could not find specification for target "aarch64-apple-visionos". Run `rustc --print target-list` for a list of built-in targets

@QuentinPerez
Copy link
Contributor Author

I am not sure to understand why the blzmod BCR step fails only on window

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.

3 participants