Use doc comments to generate the component docs #3698
Labels
domain: external docs
Anything related to Vector's external, public documentation
domain: internal docs
Anything related to Vector's internal documentation
have: nice
This feature is nice to have. It is low priority.
There's been a bit of a discussion for this before, but I decided to create an issue that we can track the progress on this idea with.
So, rust has this doc-comments macro (and a syntax sugar
///
for it), and arustdoc
utility that can generate the human-readable documentation from them.It would be kind of cool to be able to use the same comments we have in the code as the documentation:
There are multiple approaches we could take to derive the website docs from the doc-comments:
rustdoc
generates the HTML documentation pages; we could parse the generated HTML and fetch the data out of it;rustdoc
could also generate raw Markdown documentation (via-w
/--output-format
flags) - that option has been deprecated though;rustdoc
is (re)gaining the ability to generate JSON via (--output-format json
) - it's currently a WIP, but we could use that once it's implemented and goes out of nightly (or we could use it in nightly).rustdoc
to produce the output in the whatever form we need - that option has been deprecated though;///
s from it.So, that's all I have to pose the problem, let's discuss!
The text was updated successfully, but these errors were encountered: