Skip to content

Commit

Permalink
xtask: add README.md
Browse files Browse the repository at this point in the history
Add documentation in a README.md file.

Signed-off-by: Manos Pitsidianakis <[email protected]>
  • Loading branch information
epilys committed Dec 7, 2024
1 parent 8d87493 commit 90d13c6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions xtask/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# `xtask` - Run tasks with `cargo`

This binary crate provides support for running useful tasks with `cargo xtask <..>`.

## `mangen`

The `mangen` task which is enabled by the `mangen` cargo feature, builds ROFF manual pages for binary crates in this repository. It uses the [`clap_mangen`](https://crates.io/crates/clap_mangen) crate to generate ROFF from the crate's argument types which implement the `clap::CommandFactory` trait, through the `clap::Parser` derive macro.

```session
$ cargo xtask mangen
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s
Running `target/debug/xtask mangen`
Generated the following manual pages:
/path/to/rust-vmm/vhost-device/target/dist/man/vhost-device-sound.1
/path/to/rust-vmm/vhost-device/target/dist/man/vhost-device-scmi.1
```

The following crates have manual pages built by default:

- [`vhost-device-sound`](../vhost-device-sound/README.md), enabled by the default feature `vhost-device-sound`.
- It can further be fine-tuned with the features `vhost-device-sound-pipewire` and `vhost-device-sound-alsa`.
- [`vhost-device-scmi`](../vhost-device-scmi/README.md), enabled by the default feature `vhost-device-scmi`.

0 comments on commit 90d13c6

Please sign in to comment.