use wasmi::{ModuleInstance, ImportsBuilder, NopExternals, RuntimeValue}; fn init_population() -> Vec { unimplemented!(); } fn mutate() -> Vec { unimplemented!(); } fn parse_expr(expr: Vec) -> Vec { unimplemented!(); } fn asd() { let wasm_binary: Vec = wabt::wat2wasm( r#" (module (func (export "test") (param i32) (result i32) i32.const 1337 ) ) "#, ) .expect("failed to parse wat"); let module = parity_wasm::elements::Module::from_bytes(&wasm_binary) .expect("failed to load wasm"); for (export, function) in module.export_section().unwrap().entries().iter() .zip(module.function_section().unwrap().entries().iter()) { let func_body: parity_wasm::elements::FuncBody = function.try_into().unwrap(); println!("{} - {:?}", export.field(), function); } } #[cfg(test)] mod tests { #[test] fn it_works() { super::asd(); } }