1#![forbid(unsafe_code)]
7#![cfg(target_os = "linux")]
8
9#[global_allocator]
11static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
12
13#[cfg(target_os = "linux")]
15openssl_crypto_only::openssl_crypto_only!();
16
17pub fn underhill_main() -> anyhow::Result<()> {
20 let argv0 = std::path::PathBuf::from(std::env::args_os().next().unwrap());
21 match argv0.file_name().unwrap().to_str().unwrap() {
22 "underhill-init" => underhill_init::main(),
23 "underhill-crash" => underhill_crash::main(),
24 "underhill-dump" => underhill_dump::main(),
25 _ => underhill_core::main(),
26 }
27}