use clap::Parser as _;
use nanalogue_core::commands;
use rust_htslib::htslib;
use std::io;
#[cfg(target_env = "musl")]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
fn main() {
nanalogue_core::init_ssl_certificates();
unsafe {
htslib::hts_set_log_level(0);
}
let cli = commands::Cli::parse();
let stdout = io::stdout();
let handle = io::BufWriter::new(stdout);
match commands::run(cli, handle) {
Ok(()) => {}
Err(e) => {
eprintln!("Error during execution: {e}");
std::process::exit(1);
}
}
}