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

Support visionOS, watchOS, and tvOS #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

simlay
Copy link
Member

@simlay simlay commented Jun 7, 2024

This work piggy backs off the work in #102.

Things are a bit rough. Based on my exploration of SDK's (that I have on my box), OpenAL is on macOS, tvOS and iOS but not watchOS or visionOS. Other than OpenAL, it seems that visionOS, watchOS and tvOS all act like iOS.

CC @madsmtm the visionOS clang target here I think is relevant to your interests.

Comment on lines +140 to +146
// The full list of clang targtes may be:
// https://github.com/llvm/llvm-project/blob/7476c20c481cbccbdb89139fb94620e083015932/llvm/include/llvm/BinaryFormat/MachO.def#L123-L138
let clang_target = match target {
"aarch64-apple-ios" => "arm64-apple-ios",
"aarch64-apple-visionos" => "arm64-apple-xros",
"aarch64-apple-visionos-sim" => "aarch64-apple-xros-simulator",
"aarch64-apple-darwin" => "arm64-apple-darwin",
target => target,
Copy link
Member Author

Choose a reason for hiding this comment

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

I am unsure that this link is fully relevant/correct. Getting the target triple of aarch64-apple-xros-simulator took a bit of brute force... now that I look at it, I don't know that I tried arm64-aple-xros-simulator as a target. This passes with both aarch64-apple-xros-simulator and arm64-apple-xros-simulator. Neither are close to the rust target triples so I have no idea what to use.

Copy link

Choose a reason for hiding this comment

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

there was a conversation about this at clang and rust-lang.
Apple originally rolled out xros targets in llvm and clang. Later they released visionOS branding and that's what Xcode uses, but Xcode translates it to xros and sends it to clang. See my #102 notes.

Copy link
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.

Not familiar enough with CoreAudio to really say something useful here, looks good from at quick skim.

build.rs Outdated
Comment on lines 75 to 78
println!("cargo:rustc-link-lib=framework=AudioToolbox");
}
if !target.contains("apple-watchos") {
headers.push("AudioUnit/AudioUnit.h");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If the headers aren't available on watchOS, maybe it would be prudent to also not (try to) link?

Copy link

Choose a reason for hiding this comment

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

+1 on watchOS

Co-authored By: Eugene Hauptmann <[email protected]>
@simlay simlay force-pushed the tier-3-more-apple-targets branch from 3844827 to 9cc7712 Compare June 8, 2024 21:28
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