/* * SPDX-FileCopyrightText: 2025 April Faye John & Contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release mod gui; mod bininfo; mod pman; use clap::{Subcommand, Parser}; use pman::init_process_manager; use shadow_rs::shadow; shadow!(build); /// Simple program to greet a person #[derive(Parser, Debug)] #[command(version, about, long_about = None)] struct Args { /// Name of the person to greet //#[arg(short, long)] //name: String, /// Number of times to greet //#[arg(short, long, default_value_t = 1)] //count: u8, #[command(subcommand)] command: Commands, } #[derive(Debug, Subcommand)] enum Commands { #[command(arg_required_else_help = true, about = "todo replace this cmd")] Clone { /// The remote to clone remote: String, }, #[command(about = "List compile time backed info to audit binary")] Shadow { outfile: Option, }, #[command(about = "Show test gui")] Gui, } fn main() { let args = Args::parse(); init_process_manager(); match args.command { Commands::Clone { remote } => { } Commands::Shadow { outfile } => { bininfo::print_info(); return; } Commands::Gui => { let res = gui::gui_main(); if let Err(e) = res { println!("{}", e); } } }; }