From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Carlos Bilbao <carlos.bilbao@kernel.org>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-kernel@vger.kernel.org, Miguel Ojeda <ojeda@kernel.org>
Subject: Re: [PATCH 0/1] fix rustdoc build detection
Date: Fri, 21 Nov 2025 10:40:57 +0100 [thread overview]
Message-ID: <20251121104057.5aecce59@foz.lan> (raw)
In-Reply-To: <CANiq72kGvfB2wqAv-d7F9racGoSX+TOmezA=ip-E4ouva-0U=Q@mail.gmail.com>
Em Tue, 18 Nov 2025 23:02:35 +0100
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> escreveu:
> On Mon, Nov 17, 2025 at 1:32 PM Mauro Carvalho Chehab
> <mchehab+huawei@kernel.org> wrote:
> >
> > Heh, the same applies to the current usage of htmldocs - specially
> > when SPHINXDIRS is used, e.g. one doing, for instance:
> >
> > make SPHINXDOCS=driver-api/<subsystem>
> >
> > may not be interested on building rust docs, which, on such case,
> > may be a lot slower than a partial build. Also, I don't think that
> > rustdoc currently does something similar to SPHINXDOCS.
>
> If you mean building the Rust docs introduces extra work for people
> building the HTML docs when that happens automatically, then yeah,
> definitely.
>
> Perhaps it could be skipped depending on what folders are requested.
Yeah, that sounds a good approach: teach rustdoc target to handle
SPHINXDOCS. If it is empty (or just ".") handle the same way as
today. Otherwise, do a partial doc build or skip when it doesn't
make sense.
>
> > E.g. you would create a parser_rust.py module there, which would
> > generate ReST output from the rust code(*).
>
> To clarify, the idea of the "external references map file" in that
> issue isn't to stop using `rustdoc`,
I'm not talking about stop using rustdoc. I'm talking about using
it to output on a format that Sphinx can understand, and let Sphinx
do the final output, solving cross-references.
> but rather to allow `rustdoc` to
> have (at least) the references to C items (e.g. a link to the rendered
> `printk` docs at least to the source code where it is defined). In
> other words, it is about allowing developrers to just write something
> like [`printk()`] and the system would figure out how to link to the
> right docs automatically.
>
> We don't plan to stop using `rustdoc` -- its output is specialized for
> Rust which makes it quite nice.
>
> `rustdoc` can export JSON and that should be possible to use easily
> from a Sphinx plugin without having to parse Rust from scratch, to at
> least get some degree of Sphinx support.
There is a JSON Sphinx plugin (although I never used - no idea if
it would do what it is needed):
https://sphinx-jsonschema.readthedocs.io/en/latest/
If this won't work, I guess it wouldn't be hard to use parser_yaml.py as
an example to write a new plugin to handle rustdoc JSON output.
> That would be nice for the
> other outputs support like PDF as you mention, yeah, as well as having
> independent-to-the-config docs. We discussed it a few times, but it
> has never been a high priority, especially since `rustdoc` does its
> job quite well.
Thanks,
Mauro
next prev parent reply other threads:[~2025-11-21 9:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 9:12 [PATCH 0/1] fix rustdoc build detection Mauro Carvalho Chehab
2025-11-17 9:12 ` [PATCH 1/1] docs: makefile: move rustdoc check to the build wrapper Mauro Carvalho Chehab
2025-11-17 9:20 ` Miguel Ojeda
2025-11-17 11:04 ` Mauro Carvalho Chehab
2025-11-18 16:38 ` Jonathan Corbet
2025-11-18 19:11 ` Mauro Carvalho Chehab
2025-11-18 20:32 ` Mauro Carvalho Chehab
2025-11-18 21:34 ` Miguel Ojeda
2025-11-18 21:40 ` Miguel Ojeda
2025-11-20 20:13 ` Mauro Carvalho Chehab
2025-11-17 9:19 ` [PATCH 0/1] fix rustdoc build detection Miguel Ojeda
2025-11-17 10:48 ` Mauro Carvalho Chehab
2025-11-17 11:22 ` Miguel Ojeda
2025-11-17 11:25 ` Miguel Ojeda
2025-11-17 12:32 ` Mauro Carvalho Chehab
2025-11-18 22:02 ` Miguel Ojeda
2025-11-21 9:40 ` Mauro Carvalho Chehab [this message]
2025-11-24 1:51 ` Miguel Ojeda
2025-11-24 8:18 ` Mauro Carvalho Chehab
2025-11-24 8:34 ` Mauro Carvalho Chehab
2025-11-18 23:23 ` Carlos Bilbao
2025-11-21 9:12 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251121104057.5aecce59@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=carlos.bilbao@kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).