difftreelog
feat make mimalloc optional
in: master
2 files changed
cmds/jrsonnet/Cargo.tomldiffbeforeafterboth--- a/cmds/jrsonnet/Cargo.toml
+++ b/cmds/jrsonnet/Cargo.toml
@@ -8,12 +8,17 @@
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+[features]
+default = []
+# Use mimalloc as allocator
+mimalloc = []
+
[dependencies]
jrsonnet-evaluator = { path = "../../crates/jrsonnet-evaluator", version = "1.0.0" }
jrsonnet-parser = { path = "../../crates/jrsonnet-parser", version = "1.0.0" }
jrsonnet-cli = { path = "../../crates/jrsonnet-cli", version = "0.1.0" }
# TODO: Fix mimalloc compile errors, and use them
-mimallocator = "0.1.3"
+mimallocator = { version = "0.1.3", optional = true }
[dependencies.clap]
git = "https://github.com/clap-rs/clap"
cmds/jrsonnet/src/main.rsdiffbeforeafterboth3use jrsonnet_evaluator::{error::Result, EvaluationState};3use jrsonnet_evaluator::{error::Result, EvaluationState};4use std::{path::PathBuf, rc::Rc};4use std::{path::PathBuf, rc::Rc};556#[cfg(feature = "mimalloc")]6#[global_allocator]7#[global_allocator]7static GLOBAL: mimallocator::Mimalloc = mimallocator::Mimalloc;8static GLOBAL: mimallocator::Mimalloc = mimallocator::Mimalloc;89