1#![forbid(unsafe_code)]
7#![cfg(target_os = "linux")]
8
9#[global_allocator]
12#[cfg(not(feature = "mem-profile-tracing"))]
13static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
14#[global_allocator]
15#[cfg(feature = "mem-profile-tracing")]
16static GLOBAL: dhat::Alloc = dhat::Alloc;
17
18#[cfg(target_arch = "x86_64")]
23use fast_memcpy as _;
24
25#[cfg(target_os = "linux")]
27openssl_crypto_only::openssl_crypto_only!();
28
29pub fn underhill_main() -> anyhow::Result<()> {
32 let argv0 = std::path::PathBuf::from(std::env::args_os().next().unwrap());
33 match argv0.file_name().unwrap().to_str().unwrap() {
34 "underhill-init" => underhill_init::main(),
35 "underhill-crash" => underhill_crash::main(),
36 "underhill-dump" => underhill_dump::main(),
37 _ => underhill_core::main(),
38 }
39}