wasmonkey 0.1.18

WebAssembly object-file patcher for replacing exported functions with imports from a builtins library
1
2
3
4
5
6
7
8
use parity_wasm::elements::{Module, Section};

pub fn find_type_section_idx(module: &Module) -> Option<usize> {
    module.sections().iter().position(|section| match section {
        Section::Type(_) => true,
        _ => false,
    })
}