Clap Show the description written in the code
examples/clap/show-description-from-code/Cargo.toml
[package] name = "show-description-from-code" version = "0.1.0" edition = "2021" description = "This is the description in Cargo.toml" [dependencies] clap = { version = "4.5.7", features = ["derive"] }
examples/clap/show-description-from-code/src/main.rs
use clap::Parser; #[derive(Parser)] #[command(about = "Hello from the code")] struct Cli {} fn main() { let _args = Cli::parse(); println!("Use --help to show the description from the code"); }