diff --git a/vm/src/mem/mod.rs b/vm/src/mem/mod.rs index c82db5cb..d2174ac0 100644 --- a/vm/src/mem/mod.rs +++ b/vm/src/mem/mod.rs @@ -41,6 +41,7 @@ pub trait Memory { fn log_instr(&mut self, _at: Address, _regs: &[Value]) {} } +#[cfg(feature = "alloc")] #[derive(Default)] pub struct InstrLogger { #[cfg(debug_assertions)] @@ -49,6 +50,7 @@ pub struct InstrLogger { disp_buf: alloc::string::String, } +#[cfg(feature = "alloc")] impl InstrLogger { /// # Safety /// - `addr` needs to point to a valid instruction