1#![forbid(unsafe_code)]
7#![cfg(target_os = "linux")]
8
9#[global_allocator]
11static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
12
13#[cfg(target_arch = "x86_64")]
18use fast_memcpy as _;
19
20#[cfg(target_os = "linux")]
22openssl_crypto_only::openssl_crypto_only!();
23
24pub fn underhill_main() -> anyhow::Result<()> {
27 let argv0 = std::path::PathBuf::from(std::env::args_os().next().unwrap());
28 match argv0.file_name().unwrap().to_str().unwrap() {
29 "underhill-init" => underhill_init::main(),
30 "underhill-crash" => underhill_crash::main(),
31 "underhill-dump" => underhill_dump::main(),
32 _ => underhill_core::main(),
33 }
34}