Commit Graph

5 Commits

Author SHA1 Message Date
Manos Pitsidianakis
5e83c07f87 xtask: generate manpage for vhost-device-scsi
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
2025-11-13 14:59:23 +01:00
Manos Pitsidianakis
27c3e20c32 xtask: run clippy --fix
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
2025-07-18 10:05:07 +02:00
Manos Pitsidianakis
f6f4a90e12 xtask: also generate EXAMPLES section
Include "Examples" section from READMEs if they exist into the generated
manual page.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
2025-04-15 14:25:32 +05:30
Manos Pitsidianakis
4ef66aae1e xtask: generate manpage for vhost-device-scmi
Add vhost-device-scmi support for the mangen task in xtask binary.

This generates a manpage in target/dist/man/vhost-device-scmi.1

The rendered ROFF output looks like:

  vhost-device-scmi(1)      General Commands Manual             vhost-device-scmi(1)

  NAME
         vhost-device-scmi - vhost-user SCMI backend device

  SYNOPSIS
         vhost-device-scmi <-s|--socket-path> [-d|--device] [--help-devices] [-h|--help] [-V|--version]

  DESCRIPTION
         vhost-user SCMI backend device

  OPTIONS
         -s, --socket-path=SOCKET_PATH
                vhost-user socket to use

         -d, --device=DEVICE
                Devices to expose

         --help-devices
                Print help on available devices

         -h, --help
                Print help

         -V, --version
                Print version

  VERSION
         v0.3.0

  REPORTING BUGS
         Report bugs to the project's issue tracker: https://github.com/rust-vmm/vhost-device

                  vhost-device-scmi 0.3.0                                vhost-device-scmi(1)

Fixes #697 ("Add man page for vhost-device-scmi")

Resolves: https://github.com/rust-vmm/vhost-device/issues/697
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
2025-04-15 14:25:32 +05:30
Manos Pitsidianakis
427ea9655e Add an xtask crate to generate manpages
For information about the cargo xtask workflow pattern see: <https://github.com/matklad/cargo-xtask>

This commit adds an xtask crate with only one task, "mangen", which
generates a ROFF manual page under `target/dist/man` directory for the
vhost-device-sound binary.

The xtask crate can be configured using cargo features, to help
packagers configure what manpages are generated.

This generates a manpage in target/dist/man/vhost-device-sound.1

The rendered ROFF output looks like:

  vhost-device-sound(1)        General Commands Manual       vhost-device-sound(1)

  NAME
         vhost-device-sound - A virtio-sound device using the vhost-user protocol.

  SYNOPSIS
         vhost-device-sound <--socket> <--backend> [-h|--help] [-V|--version]

  DESCRIPTION
         A virtio-sound device using the vhost-user protocol.

  OPTIONS
         --socket=SOCKET
                vhost-user Unix domain socket path

         --backend=BACKEND
                audio backend to be used

                [possible values: null, pipewire, alsa]

         -h, --help
                Print help

         -V, --version
                Print version

  VERSION
         v0.2.0

  REPORTING BUGS
         Report bugs to the project's issue tracker: https://github.com/rust-vmm/vhost-device

                        vhost-device-sound 0.2.0      vhost-device-sound(1)

Fixes #687 ("Add man page for vhost-device-sound")

Resolves: https://github.com/rust-vmm/vhost-device/issues/687
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
2025-04-15 14:25:32 +05:30