File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ features = [
32
32
]
33
33
34
34
[target .'cfg(not(any(windows, target_arch = "wasm32")))' .dependencies ]
35
- jemallocator = " 0.5.0 "
35
+ jemallocator = { version = " 0.5" , optional = true }
36
36
37
37
[dev-dependencies ]
38
38
divan = " 0.1.16"
@@ -51,4 +51,6 @@ name = "canon"
51
51
harness = false
52
52
53
53
[features ]
54
+ default = [" jemalloc" ]
55
+ jemalloc = [" jemallocator" ]
54
56
crlf = []
Original file line number Diff line number Diff line change @@ -24,9 +24,11 @@ mod terminal;
24
24
mod trace;
25
25
mod work;
26
26
27
+ #[ cfg( feature = "jemalloc" ) ]
27
28
#[ cfg( not( any( miri, windows, target_arch = "wasm32" ) ) ) ]
28
29
use jemallocator:: Jemalloc ;
29
30
31
+ #[ cfg( feature = "jemalloc" ) ]
30
32
#[ cfg( not( any( miri, windows, target_arch = "wasm32" ) ) ) ]
31
33
#[ global_allocator]
32
34
static GLOBAL : Jemalloc = Jemalloc ;
You can’t perform that action at this time.
0 commit comments