fn deserialize_compiled_module(binary: &[u8]) -> BinaryLoaderResult<CompiledModule> {
    let binary_len = binary.len();
    let mut cursor = VersionedCursor::new(binary)?;
    let table_count = load_table_count(&mut cursor)?;
    let mut tables: Vec<Table> = Vec::new();
    read_tables(&mut cursor, table_count, &mut tables)?;
    let content_len = check_tables(&mut tables, binary_len)?;

    let mut table_contents_buffer = Vec::new();
    let table_contents = read_table_contents(
        &mut cursor,
        &mut table_contents_buffer,
        content_len as usize,
    )?;

    let mut module = CompiledModule {
        version: cursor.version(),
        self_module_handle_idx: load_module_handle_index(&mut cursor)?,
        ..Default::default()
    };

    build_compiled_module(&mut module, &table_contents, &tables)?;

    Ok(module)
}
/// Module internal function that manages deserialization of modules.
Module internal function that manages deserialization of modules.
Module internal function that manages deserialization of modules .
fn deserialize_compiled_module(binary: &[u8]) -> BinaryLoaderResult<CompiledModule> {
    let binary_len = binary.len();
    let mut cursor = VersionedCursor::new(binary)?;
    let table_count = load_table_count(&mut cursor)?;
    let mut tables: Vec<Table> = Vec::new();
    read_tables(&mut cursor, table_count, &mut tables)?;
    let content_len = check_tables(&mut tables, binary_len)?;
    let mut table_contents_buffer = Vec::new();
    let table_contents = read_table_contents(
        &mut cursor,
        &mut table_contents_buffer,
        content_len as usize,
    )?;
    let mut module = CompiledModule {
        version: cursor.version(),
        self_module_handle_idx: load_module_handle_index(&mut cursor)?,
        ..Default::default()
    };
    build_compiled_module(&mut module, &table_contents, &tables)?;
    Ok(module)
}
fn deserialize_compiled_module ( binary : & [ u8 ] ) -> BinaryLoaderResult < CompiledModule > { let binary_len = binary . len ( ) ; let mut cursor = VersionedCursor :: new ( binary ) ? ; let table_count = load_table_count ( & mut cursor ) ? ; let mut tables : Vec < Table > = Vec :: new ( ) ; read_tables ( & mut cursor , table_count , & mut tables ) ? ; let content_len = check_tables ( & mut tables , binary_len ) ? ; let mut table_contents_buffer = Vec :: new ( ) ; let table_contents = read_table_contents ( & mut cursor , & mut table_contents_buffer , content_len as usize , ) ? ; let mut module = CompiledModule { version : cursor . version ( ) , self_module_handle_idx : load_module_handle_index ( & mut cursor ) ? , .. Default :: default ( ) } ; build_compiled_module ( & mut module , & table_contents , & tables ) ? ; Ok ( module ) }
Module internal function that manages deserialization of modules.
Module internal function that manages deserialization of modules .
binary
&[u8]