Skip to content

docs: add Rustdoc comments and CI support for documentation generation#151

Draft
hyperfinitism wants to merge 2 commits into
virtee:mainfrom
hyperfinitism:docs/rustdoc
Draft

docs: add Rustdoc comments and CI support for documentation generation#151
hyperfinitism wants to merge 2 commits into
virtee:mainfrom
hyperfinitism:docs/rustdoc

Conversation

@hyperfinitism
Copy link
Copy Markdown
Contributor

This PR replaces #139.

  • Add comprehensive module-level (//!) and item-level (///) Rustdoc comments across all source files, so cargo doc produces a complete API reference and the crate-level documentation can drive a cargo rdme-generated README.md.
  • Regenerate README.md from src/main.rs's crate-level doc via cargo rdme. The handwritten sections (overview, basic usage, subcommand table, build/install instructions, reporting bugs) now live as the crate-level doc, keeping cargo doc output and the rendered README in sync.
  • Add a Rustdoc CI workflow (.github/workflows/docs.yml) that runs on push and pull request:
    • cargo rdme --check: fails if README.md differs from the crate-level doc.
    • cargo doc --no-deps --all-features: fails on broken intra-doc links or other doc-build errors.

Build

# cargo install cargo-rdme
cargo rdme
cargo doc --all-features --no-deps

Note

I have left the Asciidoc files as they were. The changes to the adoc files from the preceding PR are not included in this PR.

@hyperfinitism hyperfinitism force-pushed the docs/rustdoc branch 3 times, most recently from 8d724ac to 8b3f29e Compare April 21, 2026 13:13
Add module-level documentation (//!) and doc comments (///) to all
source files to support `cargo doc` and prepare for `cargo rdme`
README generation.

Signed-off-by: Takuma IMAMURA <209989118+hyperfinitism@users.noreply.github.com>
Signed-off-by: Takuma IMAMURA <209989118+hyperfinitism@users.noreply.github.com>
@DGonzalezVillal
Copy link
Copy Markdown
Member

@hyperfinitism is the pr still in draft?

@hyperfinitism
Copy link
Copy Markdown
Contributor Author

Yes. As mentioned in #152, I recognized that this method also has some flaws. In that issue, I proposed several possible approaches.

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.

3 participants