diff --git a/Cargo.toml b/Cargo.toml index 1cfb1c8..671a13f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" default = ["jemalloc", "memfile", "logging", "tracing/release_max_level_warn"] # TODO: mmap, memfd_create() ver -memfile = ["bitflags", "lazy_static"] +memfile = ["bitflags", "lazy_static", "stackalloc"] # bytes: use `bytes` crate for collecting instead of `std::vec` @@ -52,5 +52,5 @@ recolored = { version = "1.9.3", optional = true } memchr = "2.4.1" lazy_format = "1.10.0" bitflags = {version = "1.3.2", optional = true } -stackalloc = "1.1.1" +stackalloc = {version = "1.1.1", optional = true } lazy_static = { version = "1.4.0", optional = true } diff --git a/src/main.rs b/src/main.rs index 5857749..022092b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,9 @@ #[cfg(feature="logging")] #[macro_use] extern crate tracing; +#[cfg(feature="memfile")] #[macro_use] extern crate lazy_static; +#[cfg(feature="memfile")] #[macro_use] extern crate stackalloc; /// Run this statement only if `tracing` is enabled