difftreelog
feat make mimalloc optional
in: master
2 files changed
cmds/jrsonnet/Cargo.tomldiffbeforeafterboth1[package]2name = "jrsonnet"3description = "Rust jsonnet implementation"4version = "1.0.0"5authors = ["Лач <iam@lach.pw>"]6license = "MIT"7edition = "2018"89# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html1011[dependencies]12jrsonnet-evaluator = { path = "../../crates/jrsonnet-evaluator", version = "1.0.0" }13jrsonnet-parser = { path = "../../crates/jrsonnet-parser", version = "1.0.0" }14jrsonnet-cli = { path = "../../crates/jrsonnet-cli", version = "0.1.0" }15# TODO: Fix mimalloc compile errors, and use them16mimallocator = "0.1.3"1718[dependencies.clap]19git = "https://github.com/clap-rs/clap"20rev = "48d308a8ab9e96d4b21336e428feee420dbac51d"1[package]2name = "jrsonnet"3description = "Rust jsonnet implementation"4version = "1.0.0"5authors = ["Лач <iam@lach.pw>"]6license = "MIT"7edition = "2018"89# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html1011[features]12default = []13# Use mimalloc as allocator14mimalloc = []1516[dependencies]17jrsonnet-evaluator = { path = "../../crates/jrsonnet-evaluator", version = "1.0.0" }18jrsonnet-parser = { path = "../../crates/jrsonnet-parser", version = "1.0.0" }19jrsonnet-cli = { path = "../../crates/jrsonnet-cli", version = "0.1.0" }20# TODO: Fix mimalloc compile errors, and use them21mimallocator = { version = "0.1.3", optional = true }2223[dependencies.clap]24git = "https://github.com/clap-rs/clap"25rev = "48d308a8ab9e96d4b21336e428feee420dbac51d"cmds/jrsonnet/src/main.rsdiffbeforeafterboth--- a/cmds/jrsonnet/src/main.rs
+++ b/cmds/jrsonnet/src/main.rs
@@ -3,6 +3,7 @@
use jrsonnet_evaluator::{error::Result, EvaluationState};
use std::{path::PathBuf, rc::Rc};
+#[cfg(feature = "mimalloc")]
#[global_allocator]
static GLOBAL: mimallocator::Mimalloc = mimallocator::Mimalloc;