Skip to content

Commit 2ce0d0a

Browse files
authored
Put macros behind feature (#12)
1 parent 60b30c6 commit 2ce0d0a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ categories = { workspace = true }
3535
keywords = { workspace = true }
3636

3737
[features]
38-
default = []
38+
default = ["macros"]
39+
macros = ["dep:comemo-macros"]
3940
testing = []
4041

4142
[dependencies]
42-
comemo-macros = { workspace = true }
43+
comemo-macros = { workspace = true, optional = true }
4344
parking_lot = { workspace = true }
4445
siphasher = { workspace = true }
4546

@@ -49,4 +50,4 @@ serial_test = { workspace = true }
4950
[[test]]
5051
name = "tests"
5152
path = "tests/tests.rs"
52-
required-features = ["testing"]
53+
required-features = ["macros", "testing"]

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ mod track;
9292
pub use crate::cache::evict;
9393
pub use crate::hash::Prehashed;
9494
pub use crate::track::{Track, Tracked, TrackedMut, Validate};
95+
96+
#[cfg(feature = "macros")]
9597
pub use comemo_macros::{memoize, track};
9698

9799
/// These are implementation details. Do not rely on them!

0 commit comments

Comments
 (0)