Module sections

Source
Expand description

Helper functions to gather information for each of the non-function sections of a WebAssembly module.

The code of these helper functions is straightforward since they only read metadata about linear memories, tables, globals, etc. and store them for later use.

The special case of the initialize expressions for table elements offsets or global variables is handled, according to the semantics of WebAssembly, to only specific expressions that are interpreted on the fly.

Functionsยง

parse_data_section
Parses the Data section of the wasm module.
parse_element_section
Parses the Element section of the wasm module.
parse_export_section
Parses the Export section of the wasm module.
parse_function_section
Parses the Function section of the wasm module.
parse_global_section
Parses the Global section of the wasm module.
parse_import_section
Parses the Import section of the wasm module.
parse_memory_section
Parses the Memory section of the wasm module.
parse_name_section
Parses the Name section of the wasm module.
parse_start_section
Parses the Start section of the wasm module.
parse_table_section
Parses the Table section of the wasm module.
parse_tag_section
Parser the Tag section of the wasm module.
parse_type_section
Parses the Type section of the wasm module.
read_elems ๐Ÿ”’
wpheaptype_to_type
Converts a wasmparser heap type to a Wasm Type.
wpreftype_to_type
Converts a wasmparser ref type to a Wasm Type.
wptype_to_type
Helper function translating wasmparser types to Wasm Type.