#[derive(Debug, Clone)]
#[non_exhaustive]
pub struct InterpreterConfig {
pub max_operations: u64,
pub max_while_iterations: u64,
pub max_memory_bytes: u64,
pub max_stdout_bytes: u64,
pub max_concurrent_tools: u32,
pub max_execution_time: Option<std::time::Duration>,
pub max_recursion_depth: u32,
pub max_int_bits: u64,
}
impl Default for InterpreterConfig {
fn default() -> Self {
Self {
max_operations: 10_000_000,
max_while_iterations: 100_000,
max_memory_bytes: 128 * 1024 * 1024,
max_stdout_bytes: 64 * 1024,
max_concurrent_tools: 10,
max_execution_time: None,
max_recursion_depth: 1000,
max_int_bits: 1_048_576,
}
}
}