mirror of
https://github.com/babichjacob/ac-qu-ai-nt.git
synced 2025-10-02 16:57:53 -04:00
chore: build out the infrastructure for commands to be passed to the clap CLI
This commit is contained in:
@@ -1,4 +1,15 @@
|
|||||||
pub fn main() {
|
use clap::{Parser, Subcommand};
|
||||||
|
|
||||||
|
#[derive(Debug, Subcommand)]
|
||||||
|
enum Command {}
|
||||||
|
|
||||||
|
#[derive(Debug, Parser)]
|
||||||
|
pub struct Args {
|
||||||
|
#[command(subcommand)]
|
||||||
|
command: Command,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn main(args: Args) {
|
||||||
#[cfg(feature = "tracing")]
|
#[cfg(feature = "tracing")]
|
||||||
tracing::info!("What's up, world?");
|
tracing::info!("What's up, world?");
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,7 @@
|
|||||||
|
use clap::Parser;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
ac_qu_ai_nt_cli_clap::main();
|
let args = ac_qu_ai_nt_cli_clap::Args::parse();
|
||||||
|
|
||||||
|
ac_qu_ai_nt_cli_clap::main(args);
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@ struct Args {
|
|||||||
enum Command {
|
enum Command {
|
||||||
#[cfg(feature = "cli-clap")]
|
#[cfg(feature = "cli-clap")]
|
||||||
#[command(alias = "cli")]
|
#[command(alias = "cli")]
|
||||||
CliClap,
|
CliClap(ac_qu_ai_nt_cli_clap::Args),
|
||||||
#[cfg(feature = "gui-eframe")]
|
#[cfg(feature = "gui-eframe")]
|
||||||
#[command(alias = "gui")]
|
#[command(alias = "gui")]
|
||||||
GuiEframe,
|
GuiEframe,
|
||||||
@@ -57,7 +57,7 @@ fn main() {
|
|||||||
|
|
||||||
match command {
|
match command {
|
||||||
#[cfg(feature = "cli-clap")]
|
#[cfg(feature = "cli-clap")]
|
||||||
Command::CliClap => ac_qu_ai_nt_cli_clap::main(),
|
Command::CliClap(args) => ac_qu_ai_nt_cli_clap::main(args),
|
||||||
#[cfg(feature = "gui-eframe")]
|
#[cfg(feature = "gui-eframe")]
|
||||||
Command::GuiEframe => ac_qu_ai_nt_gui_eframe::main(),
|
Command::GuiEframe => ac_qu_ai_nt_gui_eframe::main(),
|
||||||
#[cfg(feature = "tui-ratatui")]
|
#[cfg(feature = "tui-ratatui")]
|
||||||
|
Reference in New Issue
Block a user