mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 20:32:10 +00:00
20 lines
665 B
Rust
20 lines
665 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, LintRunner, Runner, TypeCheckRunner};
|
|
|
|
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::Check(options) => TypeCheckRunner::new(options).run(),
|
|
}
|
|
}
|