Skip to content

Aspect to generate workspace-wide rustdoc #152

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

Open
acmcarther opened this issue Nov 8, 2018 · 2 comments
Open

Aspect to generate workspace-wide rustdoc #152

acmcarther opened this issue Nov 8, 2018 · 2 comments

Comments

@acmcarther
Copy link
Collaborator

acmcarther commented Nov 8, 2018

This issue is motivated by several observations

  • rust_doc rules don't really have tunable parameters
  • It should be possible to generate rust_doc decls for all rust_library rules
  • It should be possible to link generated rust_doc together in terms of exact dependencies
  • It should be possible to index workspace wide rustdoc by BUILD path

I think aspects are a good fit for this, and a simple packaged rules_rust implementation could enable generating lots of immediately useful docs (including for external deps!). As a stretch goal, it could also probably supplement the generated information with details from the workspace, and perhaps even provide a simple binary to serve the unified documentation.

@mfarrugi
Copy link
Collaborator

mfarrugi commented Nov 8, 2018

Sounds good to me, since it removes the noise of declaring extra redundant targets.

Would this treatment make sense for doctests too? I imagine regular tests use dev dependencies a little too often for that to make sense.

How does rustdoc let us organize docs by build paths?

@acmcarther
Copy link
Collaborator Author

My understanding is that rustdoc provides lots of niceties for single crates, but basically nothing for multiple crates. Projects that expose documentation for multiple crates do so in a custom way.

I figure that if sufficiently motivated, we could probably supply something similar.... a generated static site that proides an aggregation of the complete set of documentation. I was thinking that such an aggregation probably ought to be indexed by the BUILD path to each crate, and could probably also provide cross-links to dependencies and dependents.

I haven't set aside a lot of time to work on this yet, but I thought about it out of the blue and I figure the minimal example is actually not too difficult to set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants