temp commit

This commit is contained in:
2025-07-12 00:46:10 +02:00
parent 1868f1a506
commit fe89188c4b
60 changed files with 1536 additions and 709 deletions

View File

@@ -9,6 +9,8 @@ use check_api_refs::check_api_refs;
use clap::{Parser, Subcommand};
use orcx::orcx;
use crate::orcx::orcxdb;
#[derive(Parser)]
pub struct Args {
#[arg(short, long)]
@@ -22,7 +24,11 @@ pub enum Commands {
CheckApiRefs,
Orcx {
#[arg(trailing_var_arg = true, num_args = 1..)]
orcx_argv: Vec<String>,
argv: Vec<String>,
},
Orcxdb {
#[arg(trailing_var_arg = true, num_args = 1..)]
argv: Vec<String>,
},
}
@@ -35,7 +41,8 @@ fn main() -> io::Result<ExitCode> {
let args = Args::parse();
match &args.command {
Commands::CheckApiRefs => check_api_refs(&args)?,
Commands::Orcx { orcx_argv } => orcx(&args, orcx_argv)?,
Commands::Orcx { argv } => orcx(&args, argv)?,
Commands::Orcxdb { argv } => orcxdb(&args, argv)?,
}
Ok(if EXIT_OK.load(Ordering::Relaxed) { ExitCode::SUCCESS } else { ExitCode::FAILURE })
}

View File

@@ -14,3 +14,15 @@ pub fn orcx(_args: &Args, argv: &[String]) -> io::Result<()> {
}
Ok(())
}
pub fn orcxdb(_args: &Args, argv: &[String]) -> io::Result<()> {
if !Command::new("cargo").args(["build", "-p", "orchid-std"]).status()?.success() {
EXIT_OK.store(false, Ordering::Relaxed);
return Ok(());
}
let path = format!("./target/debug/orcx{}", std::env::consts::EXE_SUFFIX);
if !Command::new("lldb").args([&path]).args(argv).status()?.success() {
EXIT_OK.store(false, Ordering::Relaxed);
}
Ok(())
}