| 1 | // Default allocator: mimalloc. `--no-default-features --features rusty-alloc` |
| 2 | // selects the Rust allocator without building the C allocator (#5872). |
| 3 | // With neither feature the standard library system allocator is used. |
| 4 | #[cfg(all(feature = "mimalloc-allocator", not(feature = "rusty-alloc")))] |
| 5 | #[global_allocator] |
| 6 | static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; |
| 7 | |
| 8 | #[cfg(feature = "rusty-alloc")] |
| 9 | #[global_allocator] |
| 10 | static GLOBAL: rusty_alloc_api::RustyAlloc = rusty_alloc_api::RustyAlloc; |
| 11 | |
| 12 | fn main() -> std::process::ExitCode { |
| 13 | codewhale_tui::run(std::env::args().collect()) |
| 14 | } |
| 15 |