18 lignes
563 B
Rust
18 lignes
563 B
Rust
// Prevents additional console window on Windows in release
|
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
|
|
|
fn main() {
|
|
let args: Vec<String> = std::env::args().collect();
|
|
if args.len() > 1 {
|
|
#[cfg(windows)]
|
|
unsafe {
|
|
use windows_sys::Win32::System::Console::{AttachConsole, ATTACH_PARENT_PROCESS};
|
|
AttachConsole(ATTACH_PARENT_PROCESS);
|
|
}
|
|
let code = verif_etat_lib::cli::CliRunner::run(&args);
|
|
std::process::exit(code);
|
|
} else {
|
|
verif_etat_lib::run();
|
|
}
|
|
}
|