oxc/crates/oxc_cli/src/main.rs
Boshen f4132976e9
chore: say good bye to ezno (#2048)
ezno has decided to focus on its own compiler for 2024,
we part away but we still collaborate and share knowledge together.
2024-01-16 13:53:54 +08:00

20 lines
660 B
Rust

#![cfg(not(miri))] // Miri does not support custom allocators
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
#[cfg(target_os = "windows")]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
use oxc_cli::{CliCommand, CliRunResult, FormatRunner, LintRunner, Runner};
fn main() -> CliRunResult {
let options = oxc_cli::cli_command().fallback_to_usage().run();
options.handle_threads();
match options {
CliCommand::Lint(options) => LintRunner::new(options).run(),
CliCommand::Format(options) => FormatRunner::new(options).run(),
}
}