openvm_circuit/arch/execution_mode/
preflight.rs1use crate::arch::Arena;
2
3pub struct PreflightCtx<RA> {
4 pub arenas: Vec<RA>,
5 pub instret_left: u64,
6}
7
8impl<RA: Arena> PreflightCtx<RA> {
9 pub fn new_with_capacity(capacities: &[(usize, usize)], instret_left: Option<u64>) -> Self {
14 let arenas = capacities
15 .iter()
16 .map(|&(height, main_width)| RA::with_capacity(height, main_width))
17 .collect();
18
19 Self {
20 arenas,
21 instret_left: instret_left.unwrap_or(u64::MAX),
22 }
23 }
24}