Skip to content

Commit

Permalink
fix: feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
nhtyy committed Nov 14, 2024
1 parent 4e40ea4 commit a1a732c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion crates/core/executor/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use crate::{
},
hook::{HookEnv, HookRegistry},
memory::{Entry, PagedMemory},
profiler::Profiler,
record::{ExecutionRecord, MemoryAccessRecord},
report::ExecutionReport,
state::{ExecutionState, ForkState},
Expand All @@ -23,6 +22,9 @@ use crate::{
Instruction, Opcode, Program, Register,
};

#[cfg(debug_assertions)]
use crate::profiler::Profiler;

/// An executor for the SP1 RISC-V zkVM.
///
/// The exeuctor is responsible for executing a user program and tracing important events which
Expand Down Expand Up @@ -96,6 +98,7 @@ pub struct Executor<'a> {
pub io_buf: HashMap<u32, String>,

/// The ZKVM profiler. This is only available in debug mode.
#[cfg(debug_assertions)]
pub profiler: Option<(Profiler, BufWriter<File>)>,

/// The state of the runtime when in unconstrained mode.
Expand Down
1 change: 1 addition & 0 deletions crates/core/executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ mod instruction;
mod io;
mod memory;
mod opcode;
#[cfg(debug_assertions)]
mod profiler;
mod program;
#[cfg(any(test, feature = "programs"))]
Expand Down
1 change: 0 additions & 1 deletion crates/core/executor/src/profiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use goblin::elf::{sym::STT_FUNC, Elf};
use indicatif::{ProgressBar, ProgressStyle};
use rustc_demangle::demangle;
use std::collections::HashMap;
use std::sync::Arc;

#[derive(Debug, thiserror::Error)]
pub enum ProfilerError {
Expand Down

0 comments on commit a1a732c

Please sign in to comment.