diff --git a/processor/src/host/debug.rs b/processor/src/host/debug.rs index 1636aa2452..5375ed67c0 100644 --- a/processor/src/host/debug.rs +++ b/processor/src/host/debug.rs @@ -1,6 +1,9 @@ use super::{Felt, ProcessState}; use crate::{Vec, Word}; -use vm_core::DebugOptions; +use vm_core::{ + utils::string::{String, ToString}, + DebugOptions, +}; // DEBUG HANDLER // ================================================================================================ @@ -87,6 +90,7 @@ fn print_vm_stack(clk: u32, stack: Vec, n: usize) { } /// Prints the whole memory state at the cycle `clk` in context `ctx`. +#[cfg(feature = "std")] fn print_mem_all(clk: u32, ctx: u32, mem: Vec<(u64, Word)>) { println!("Memory state before step {clk} for the context {ctx}:"); @@ -121,6 +125,7 @@ fn print_mem_all(clk: u32, ctx: u32, mem: Vec<(u64, Word)>) { } /// Prints the memory value stored at the requested address `addr`. +#[cfg(feature = "std")] fn print_mem(clk: u32, ctx: u32, addr: u32, value: Option, local: bool) { if local { println!("Local state before step {} for the context {} at index {}:", clk, ctx, addr); @@ -139,6 +144,7 @@ fn print_mem(clk: u32, ctx: u32, addr: u32, value: Option, local: bool) { /// /// If `print_all` is true, the interval should contain all indexes of locals available for the /// current procedure. +#[cfg(feature = "std")] fn print_local_interval( process: &S, clk: u32, @@ -171,6 +177,7 @@ fn print_local_interval( /// /// `header` contains a title message corresponding to the DebugOption it is used in /// ([DebugOptions::MemInterval] or [DebugOptions::LocalInterval]). +#[cfg(feature = "std")] fn print_mem_interval(mem: Vec<(u32, Option)>, header: String) { println!("{header}");