In a project I implement a (proprietary) protocol. I want to be able to add some metadata as comments in my code, to specify which part of the protocol is implemented where. Think of something like:
for example. I want then to be able to extract this meta-information and cross-check whether all specification items are linked (that part is on my side, using some pdf-to-text and sed magic or something).
Does someone know a tool to extract metadata from rustdoc comments, possibly with source code location? The format how to specify the metadata doesn't matter (does not have to look like the above), as long as it is human readable
Or does someone know an alternative way to do this?
I really want to experiment with rustdoc's --output-format=json (unstable) feature one day, especially for diff-ing doc builds in CI. But I believe the generated JSON could also be useful for extracting data from comments.
You said "source code location", i.e., file name and line number. If you want more obviously you'll need a tool that can understand, at least a bit, Rust syntax. Sorry, I can't help you there.
Write it yourself(in python is easier, in rust for convenience), or give me specifications of what you wanted it to do and i will write it for you in rust