diff --git a/Cargo.toml b/Cargo.toml index 6538eb0..de7c373 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,5 +28,12 @@ overflow-checks = true [features] default = [] + +# Enables generation of DefAlloc edits for the checker. checker = [] -fuzzing = ["arbitrary", "checker"] + +# Enables detailed logging which can be somewhat expensive. +trace-log = [] + +# Exposes the internal API for fuzzing. +fuzzing = ["arbitrary", "checker", "trace-log"] diff --git a/src/ion/data_structures.rs b/src/ion/data_structures.rs index e0f9c47..2bc4e3b 100644 --- a/src/ion/data_structures.rs +++ b/src/ion/data_structures.rs @@ -604,7 +604,7 @@ pub struct Stats { // the most significant field to the least significant one. // // These work best when the fields are stored in reverse order in memory so that -// they can be loaded with a single u64 load. +// they can be loaded with a single u64 load on little-endian machines. #[inline(always)] pub fn u64_key(b: u32, a: u32) -> u64 { a as u64 | (b as u64) << 32 diff --git a/src/lib.rs b/src/lib.rs index 3946508..800dd4f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ // performance cost so we disable it in release builds. macro_rules! trace { ($($tt:tt)*) => { - if cfg!(debug_assertions) { + if cfg!(feature = "trace-log") { ::log::trace!($($tt)*); } };