Trait InterpretableProgram
Source pub trait InterpretableProgram {
// Required methods
fn load_data_into_memory(
&self,
mem: &mut Vec<u8>,
) -> Result<(), &'static str>;
fn initial_memory_size(&self) -> usize;
fn import_fn_details(
&self,
index: usize,
) -> Result<(&str, &str, usize), &'static str>;
fn import_fn_count(&self) -> usize;
fn fetch_export_fn_index(
&self,
name: &str,
) -> Result<(usize, usize), &'static str>;
fn fetch_instruction<'a>(
&'a self,
position: &[usize],
) -> Result<Option<&'a Instruction>, &'static str>;
fn create_locals(
&self,
position: &[usize],
) -> Result<Vec<WasmValue>, &'static str>;
}