Features/Documentation: Difference between revisions
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
Ultimately there should be five manuals: | Ultimately there should be five manuals: | ||
; QEMU user mode emulation (docs/qemu-user) | ; QEMU user mode emulation (docs/qemu-user) | ||
: | : currently in qemu-doc.texi | ||
; QEMU full-system emulation user's guide (docs/qemu-system) | ; QEMU full-system emulation user's guide (docs/qemu-system) | ||
: | : the largest part of qemu-doc.texi | ||
: | : also covers qemu-img, qemu-io | ||
: | : parts of docs/ | ||
; QEMU full-system emulation management guide (docs/qemu-system-mgmt) | ; QEMU full-system emulation management guide (docs/qemu-system-mgmt) | ||
: | : qmp-commands.txt | ||
: | : docs/specs/vhost-user.txt | ||
: | : probably should include file format specs in docs/specs/ | ||
; QEMU full-system emulation guest hardware specifications (docs/qemu-system-hw) | ; QEMU full-system emulation guest hardware specifications (docs/qemu-system-hw) | ||
: | : currently in docs/specs/ | ||
; QEMU developer's guide (docs/qemu-devel) | ; QEMU developer's guide (docs/qemu-devel) | ||
: | : the rest of docs/ | ||
: | : the implementation notes in qemu-doc.texi | ||
: | : {{src|path=tcg/README}} | ||
: | : doc comments in the source code | ||
: | : automatically generated docs for Python classes in qemu-iotests and scripts/qmp | ||
== Choices == | == Choices == | ||
Line 31: | Line 31: | ||
As a first step, we should decide how to evolve this into something more structured. | As a first step, we should decide how to evolve this into something more structured. | ||
For text, the two possible choices | For text, the two possible choices should ultimately be: | ||
# Convert everything to reStructuredText | # Convert everything to reStructuredText | ||
#:'''Advantages:''' | |||
#:'''Disadvantages:''' | |||
# Convert everything to Texinfo | # Convert everything to Texinfo | ||
#:'''Advantages:''' | |||
#:'''Disadvantages:''' | |||
For comments, the three possible choices are: | For comments, the three possible choices are: | ||
# Use reStructuredText markup | # Use reStructuredText markup | ||
#:'''Advantages:''' | |||
#:'''Disadvantages:''' | |||
# Extend kernel-doc to support Texinfo markup, and convert that to Docbook | # Extend kernel-doc to support Texinfo markup, and convert that to Docbook | ||
#:'''Advantages:''' | |||
#:'''Disadvantages:''' | |||
# Use no markup, apart from annotating fields, functions etc. using sigils (e.g. kernel-doc's <tt>&struct Foo</tt> or GtkDoc's <tt>%Foo</tt>). | # Use no markup, apart from annotating fields, functions etc. using sigils (e.g. kernel-doc's <tt>&struct Foo</tt> or GtkDoc's <tt>%Foo</tt>). | ||
#:'''Advantages:''' | |||
#:'''Disadvantages:''' | |||
== Things to do == | == Things to do == |
Revision as of 23:16, 7 November 2016
QEMU's documentation needs some reorganization.
Ultimately there should be five manuals:
- QEMU user mode emulation (docs/qemu-user)
- currently in qemu-doc.texi
- QEMU full-system emulation user's guide (docs/qemu-system)
- the largest part of qemu-doc.texi
- also covers qemu-img, qemu-io
- parts of docs/
- QEMU full-system emulation management guide (docs/qemu-system-mgmt)
- qmp-commands.txt
- docs/specs/vhost-user.txt
- probably should include file format specs in docs/specs/
- QEMU full-system emulation guest hardware specifications (docs/qemu-system-hw)
- currently in docs/specs/
- QEMU developer's guide (docs/qemu-devel)
- the rest of docs/
- the implementation notes in qemu-doc.texi
- tcg/README
- doc comments in the source code
- automatically generated docs for Python classes in qemu-iotests and scripts/qmp
Choices
Based on experience from the Linux kernel, QEMU's docs pipeline is going to be based on Sphinx. Sphinx is extensible and it is easy to add new input formats and input directives.
Currently, QEMU documentation is written in a mix of Texinfo and text files roughly based on Markdown. Sphinx's native format is reStructuredText (rST). Texinfo input is not supported by Sphinx, but Paolo has a Sphinx (docutils) parser for Docbook; Texinfo is able to convert .texi input files into Docbook.
Currently, QEMU doc comments have never been actually used together with a actual documentation generator in mind, but are roughly based on gtk-doc syntax. We will probably end up keeping a copy of the Linux kernel's kernel-doc script. kernel-doc currently supports rST and Docbook output.
As a first step, we should decide how to evolve this into something more structured.
For text, the two possible choices should ultimately be:
- Convert everything to reStructuredText
- Advantages:
- Disadvantages:
- Convert everything to Texinfo
- Advantages:
- Disadvantages:
For comments, the three possible choices are:
- Use reStructuredText markup
- Advantages:
- Disadvantages:
- Extend kernel-doc to support Texinfo markup, and convert that to Docbook
- Advantages:
- Disadvantages:
- Use no markup, apart from annotating fields, functions etc. using sigils (e.g. kernel-doc's &struct Foo or GtkDoc's %Foo).
- Advantages:
- Disadvantages:
Things to do
For now in no particular order:
- Reorganize the docs/ directory to reflect which files will end up in which manual
- Split qemu-doc.texi so that the bulk of its contents comes from docs/