mirascript_vm/
run_options.rs1use std::{rc::Rc, time::Duration};
2
3use crate::{RuntimeProviders, default_runtime_providers};
4
5#[derive(Clone)]
7pub struct RunOptions {
8 pub timeout: Duration,
10 pub checkpoint_interval: u32,
12 pub max_call_depth: u32,
14 pub max_array_len: usize,
16 pub providers: Rc<dyn RuntimeProviders>,
18}
19
20impl Default for RunOptions {
21 fn default() -> Self {
22 Self {
23 timeout: Duration::from_millis(100),
24 checkpoint_interval: 100,
25 max_call_depth: 128,
26 max_array_len: 0x100_0000,
27 providers: default_runtime_providers(),
28 }
29 }
30}