embargo_cpp/cli/
mod.rs

1
2use clap::Subcommand;
3pub use clean::CleanArgs;
4pub use new::NewArgs;
5pub use build::{BuildArgs, Profile as BuildProfile};
6pub use run::RunArgs;
7pub use args::Args;
8
9mod new;
10mod project_type;
11mod build;
12mod run;
13mod clean;
14mod args;
15
16#[derive(Subcommand, Debug)]
17pub enum Commands {
18    
19    /// Initialize a new C++ project in the current working directory.
20    Init,
21
22    /// Create a new C++ project in a specified directory within the current working directory.
23    New(NewArgs),
24
25    /// Compile an Embargo project.
26    Build(BuildArgs),
27
28    /// Compile and run an Embargo project.
29    Run(RunArgs),
30
31    /// Clean build artifacts (default behavior is clean entire build directory)
32    Clean(CleanArgs),
33
34    //Install,
35    //Uninstall,
36    //Add,
37}
38
39impl Commands {
40    pub fn debug_new(project_name: &str) -> Self {
41        Self::New(NewArgs::with_name(project_name))
42    }
43
44    pub fn debug_build() -> Self {
45        Self::Build(BuildArgs::default())
46    }
47}