Cargo command to work with Nintendo 3DS project binaries.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
607 B

use cargo_3ds::command::Cargo;
use cargo_3ds::{check_rust_version, run_cargo};
use clap::Parser;
use std::process;
3 years ago
fn main() {
check_rust_version();
3 years ago
let Cargo::Input(mut input) = Cargo::parse();
let message_format = match input.cmd.extract_message_format() {
Ok(fmt) => fmt,
Err(msg) => {
eprintln!("{msg}");
process::exit(1)
}
};
let (status, messages) = run_cargo(&input, message_format);
3 years ago
if !status.success() {
process::exit(status.code().unwrap_or(1));
}
3 years ago
input.cmd.run_callback(&messages, input.verbose);
3 years ago
}