| ff0af1ee unknown |
1 |
|
| fce44ae9 Andy McCall ↶ |
2 |
|
| 3 |
|
| 4 |
|
| 1983686f Andy McCall ↶ |
5 |
|
| fce44ae9 Andy McCall ↶ |
6 |
mod cli; |
| 1983686f Andy McCall ↶ |
7 |
|
| d443639b Andy McCall ↶ |
8 |
#[cfg(feature = "alloc-stats")] |
| 9 |
#[global_allocator] |
| 10 |
static ALLOC: oxy_core::alloc_stats::Counting = oxy_core::alloc_stats::Counting; |
| 11 |
|
| ff0af1ee unknown |
12 |
fn main() { |
| 5b1114a0 Andy McCall ↶ |
13 |
|
| 14 |
|
| 15 |
#[cfg(unix)] |
| 16 |
unsafe { |
| 17 |
libc::signal(libc::SIGPIPE, libc::SIG_DFL); |
| 18 |
} |
| d443639b Andy McCall ↶ |
19 |
let result = cli::run(); |
| 20 |
oxy_core::timing::memory_summary(); |
| 21 |
match result { |
| ff0af1ee unknown |
22 |
Ok(code) => std::process::exit(code), |
| 23 |
Err(e) => { |
| 135212de Andy McCall ↶ |
24 |
cli::ui::init(false); |
| 25 |
eprintln!("{} {e:#}", cli::ui::err("error:")); |
| ff0af1ee unknown |
26 |
std::process::exit(1); |
| 27 |
} |
| 28 |
} |
| 29 |
} |