#![doc = document_features::document_features!()]
use re_memory::AccountingAllocator;
#[global_allocator]
static GLOBAL: AccountingAllocator<mimalloc::MiMalloc> =
AccountingAllocator::new(mimalloc::MiMalloc);
fn main() -> std::process::ExitCode {
let main_thread_token = rerun::MainThreadToken::i_promise_i_am_on_the_main_thread();
if cfg!(feature = "perf_telemetry") && re_log::env_var_is_truthy("TELEMETRY_ENABLED") {
eprintln!(
"Turning off stderr logging because of perf_telemetry needs exclusive access to the global tracing subscriber"
);
} else {
re_log::setup_logging();
}
let build_info = re_build_info::build_info!();
let result = rerun::run(
main_thread_token,
build_info,
rerun::CallSource::Cli,
std::env::args(),
);
match result {
Ok(exit_code) => std::process::ExitCode::from(exit_code),
Err(err) => {
eprintln!("Error: {}", re_error::format(err));
std::process::ExitCode::FAILURE
}
}
}