Skip to content

Conversation

@madsmtm
Copy link
Owner

@madsmtm madsmtm commented Dec 22, 2025

Use the apple-doc crate I introduced in 0dd51d5 to parse the data that Xcode's documentation viewer uses (this is the same data as on https://developer.apple.com/documentation), and use that in header-translator to enhance the documentation we emit.

Fixes #309.

TODO:

  • Finish the implementation, methods don't get this documentation yet, and links are currently to Apple's website instead of to the Rust item.
  • Consider if there's some way we can include Apple's examples / tutorials, to truly make it unnecessary to want to go to Apple's website?
  • Figure out the legal implications of this? We're already redistributing basically the entire Xcode SDK, this would just be taking and redistributing more of Xcode, but maybe there's a difference? Especially given that you cannot interface with Apple's platform without the SDK, and there is not other way to write them, whereas the documentation is maybe more legally protected?
    • I had a discussion with the Rust Foundation about this in September, but they're taking a long time to get back to me.
  • Optimize this, cargo run --bin header-translator --release -- all now takes quite a bit longer.

As an example of how this would look, compare the documentation for NSVisualEffectView on Apple's website with what it would be in objc2-app-kit after this PR:

1 2 3

Take documentation links from information in Apple's documentation
bundle. We statically know that these are correct.
@madsmtm madsmtm added documentation Improvements or additions to documentation enhancement New feature or request A-framework Affects the framework crates and the translator for them labels Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-framework Affects the framework crates and the translator for them documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autogenerate documentation in framework crates

1 participant