Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 75446da

Browse files
Making jemalloc an optional feature
Signed-off-by: Sebastian Schildt <sebastian.schildt@de.bosch.com>
1 parent b12b77c commit 75446da

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

Cargo.lock

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kuksa_databroker/databroker/Cargo.toml

+6-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@ sqlparser = "0.16.0"
4848
serde = { version = "1.0", features = ["derive"] }
4949
serde_json = "1.0"
5050

51-
[target.'cfg(all(target_env = "musl", target_pointer_width = "64"))'.dependencies.jemallocator]
52-
version = "0.5.0"
51+
jemallocator = { version = "0.5.0", optional = true }
52+
53+
[features]
54+
# to enable jemalloc use --features jemalloc
55+
jemalloc = ["dep:jemallocator"]
56+
5357

5458
[build-dependencies]
5559
anyhow = "1.0"

kuksa_databroker/databroker/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* SPDX-License-Identifier: Apache-2.0
1212
********************************************************************************/
1313

14-
#[cfg(all(target_env = "musl", target_pointer_width = "64"))]
14+
#[cfg(feature = "jemalloc")]
1515
#[global_allocator]
1616
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
1717

0 commit comments

Comments
 (0)