vpp/
lib.rs

1use std::ffi::OsString;
2
3use clap::Parser;
4
5pub use crate::{
6    cmd_build::BuildCommand,
7    options::{ApplicationCommand, SharedOptions},
8};
9
10mod cmd_build;
11mod cmd_package_manager;
12mod options;
13
14#[derive(Parser)]
15#[command(version, about, long_about = include_str!("readme.md"))]
16pub struct Application {
17    /// Doc comment
18    #[arg(long, short = 'C')]
19    directory: Option<OsString>,
20    #[command(subcommand)]
21    command: ApplicationCommand,
22}
23
24impl Application {
25    pub fn run(&self) {
26        self.command.run()
27    }
28}