Skip to content

Commit

Permalink
Compile for visionOS on docs.rs too
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Jan 12, 2025
1 parent 25bb2c7 commit 6cc03b3
Show file tree
Hide file tree
Showing 85 changed files with 99 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/block2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"x86_64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
"aarch64-apple-visionos",
"x86_64-unknown-linux-gnu",
"i686-unknown-linux-gnu",
]
Expand Down
1 change: 1 addition & 0 deletions crates/dispatch2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ targets = [
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
"aarch64-apple-visionos",
"x86_64-unknown-linux-gnu",
"i686-unknown-linux-gnu",
]
Expand Down
15 changes: 15 additions & 0 deletions crates/header-translator/src/library.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,26 @@ see that for related crates.", self.data.krate)?;
default_target.get_or_insert("aarch64-apple-ios-macabi");
targets.push("aarch64-apple-ios-macabi");
}
if self.data.visionos.is_some() {
default_target.get_or_insert("aarch64-apple-visionos");
targets.push("aarch64-apple-visionos");
if self.data.macos.is_none() && self.data.ios.is_none() {
targets.push("aarch64-apple-visionos-sim");
}
}
if self.data.gnustep {
default_target.get_or_insert("x86_64-unknown-linux-gnu");
targets.push("x86_64-unknown-linux-gnu");
targets.push("i686-unknown-linux-gnu");
}

// Default max number of build targets is 10.
if 10 < targets.len() {
panic!(
"won't be able to document this crate on docs.rs, too many targets:\n{targets:#?}"
);
}

for item in targets.iter_mut() {
item.decor_mut().set_prefix("\n ");
}
Expand Down
2 changes: 1 addition & 1 deletion crates/objc2-encode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"x86_64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
"aarch64-apple-visionos",
"x86_64-unknown-linux-gnu",
"i686-unknown-linux-gnu",
]
Expand Down
2 changes: 1 addition & 1 deletion crates/objc2-exception-helper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"x86_64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
"aarch64-apple-visionos",
"x86_64-unknown-linux-gnu",
"i686-unknown-linux-gnu",
]
Expand Down
2 changes: 1 addition & 1 deletion crates/objc2-proc-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"x86_64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
"aarch64-apple-visionos",
"x86_64-unknown-linux-gnu",
"i686-unknown-linux-gnu",
]
Expand Down
2 changes: 1 addition & 1 deletion crates/objc2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"x86_64-apple-ios",
"aarch64-apple-tvos",
"aarch64-apple-watchos",
"aarch64-apple-ios-macabi",
"aarch64-apple-visionos",
"x86_64-unknown-linux-gnu",
"i686-unknown-linux-gnu",
]
Expand Down
1 change: 1 addition & 0 deletions framework-crates/objc2-accessibility/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-ad-services/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-audio-toolbox/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-authentication-services/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-av-foundation/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-av-kit/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-av-routing/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-avf-audio/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-background-assets/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-background-tasks/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-call-kit/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-class-kit/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-cloud-kit/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-color-sync/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-contacts-ui/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-contacts/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-audio-types/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-audio/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-bluetooth/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-data/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-foundation/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-graphics/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-image/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-location/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-media/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-midi/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-ml/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-motion/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-text/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-core-video/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-data-detection/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-device-check/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-event-kit-ui/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-event-kit/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-extension-kit/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions framework-crates/objc2-external-accessory/Cargo.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6cc03b3

Please sign in to comment.