zkvmc-test-util 0.0.1

Utilities tests in zkVMc
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum RuntimeType {
    Interpreter,
    Jit,
}

pub fn run(rt: RuntimeType, interpreter: impl FnOnce() -> u32, jit: impl FnOnce() -> u32) -> u32 {
    match rt {
        RuntimeType::Interpreter => interpreter(),
        RuntimeType::Jit => jit(),
    }
}