git.delta.rocks / jrsonnet / refs/commits / 8c5f44d1f49f

difftreelog

feat make mimalloc optional

Лач2020-07-22parent: #e4a890b.patch.diff
in: master

2 files changed

modifiedcmds/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"
modifiedcmds/jrsonnet/src/main.rsdiffbeforeafterboth
3use jrsonnet_evaluator::{error::Result, EvaluationState};3use jrsonnet_evaluator::{error::Result, EvaluationState};
4use std::{path::PathBuf, rc::Rc};4use std::{path::PathBuf, rc::Rc};
55
6#[cfg(feature = "mimalloc")]
6#[global_allocator]7#[global_allocator]
7static GLOBAL: mimallocator::Mimalloc = mimallocator::Mimalloc;8static GLOBAL: mimallocator::Mimalloc = mimallocator::Mimalloc;
89