Skip to content

Conversation

@madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Aug 16, 2025

By using cfg(target_vendor = "apple") instead of cfg(any(target_os = "macos", target_os = "ios")).

I suspect there may be a fairly large number of mach APIs which are likely to fail at runtime on these platforms - but that situation shouldn't be any different from iOS.

@madsmtm
Copy link
Contributor Author

madsmtm commented Aug 16, 2025

Looks like the ctest step failed because it doesn't understand cfg(target_vendor = "...") :/.

Options:

  1. Remove the compile_error! altogether.
  2. Try to make ctest pass --cfg ctest or similar, and place the cfg behind a cfg_attr.
  3. Use cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "visionos")) (brittle IMO, Apple might very well introduce a new OS).

Let me know how you'd like me to proceed.

@JohnTitor
Copy link
Owner

Or, use a newer version of ctest, see rust-lang/libc#4655.
I haven't checked, but the crate has been rewritten completely, and the issue could be resolved in it (the old one uses quite old rustc and that's the cause).
I'll test it once it's published.

Copy link
Owner

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

I've tested but it'd take some more time to work without issues.
This PR itself doesn't have any issues so I'm going to merge, thanks for contributing and sorry for the delay!

@JohnTitor JohnTitor merged commit 9fe2ca7 into JohnTitor:main Nov 15, 2025
4 of 6 checks passed
@madsmtm madsmtm deleted the all-apple branch November 15, 2025 04:35
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