Skip to content

Add RDoc documentation site for Rubydex APIs#874

Open
st0012 wants to merge 3 commits into
mainfrom
codex/rdoc-docs-api
Open

Add RDoc documentation site for Rubydex APIs#874
st0012 wants to merge 3 commits into
mainfrom
codex/rdoc-docs-api

Conversation

@st0012

@st0012 st0012 commented Jun 24, 2026

Copy link
Copy Markdown
Member

Problems

  • Rubydex does not have generated API documentation that can be published as a static site.
  • The native extension exposes Ruby APIs from C, but most public C-backed methods are not documented in a format RDoc can capture.

Solutions

  • Add RDoc configuration, a documentation rake task, and a GitHub Pages workflow using the current RDoc commit.
  • Include both Ruby and C extension sources in the generated site.
  • Convert public C-backed API comments to RDoc call-seq: blocks with RBS-ish return shapes.
Screenshot 2026-06-24 at 21 07 02

(The workspace_path attribute's type label is weird but it's a RDoc issue)

@st0012 st0012 force-pushed the codex/rdoc-docs-api branch from 6131fbc to dda7daf Compare June 24, 2026 19:44
Comment thread ext/rubydex/declaration.c
* unqualified_name -> String?
*
* Returns the declaration name without namespace qualification.
*/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RDoc's C parser only recognizes this style of C comments.

Comment thread ext/rubydex/declaration.c
// Declaration#unqualified_name -> String
/*
* call-seq:
* unqualified_name -> String?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RDoc currently doesn't have a way to read RBS sigs from C files yet. So let's use call-seq for now.

@st0012 st0012 force-pushed the codex/rdoc-docs-api branch from dda7daf to 35891d3 Compare June 24, 2026 19:55
@st0012 st0012 added the documentation Improvements or additions to documentation label Jun 24, 2026
@st0012 st0012 self-assigned this Jun 24, 2026
@st0012 st0012 linked an issue Jun 24, 2026 that may be closed by this pull request
@st0012 st0012 marked this pull request as ready for review June 24, 2026 20:08
@st0012 st0012 requested a review from a team as a code owner June 24, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Ruby API documentation for Rubydex

1 participant