MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / convert_module_memory

Function convert_module_memory

crates/parser/src/conversion.rs:88–95  ·  view source on GitHub ↗
(memory: wasmparser::MemoryType)

Source from the content-addressed store, hash-verified

86}
87
88pub(crate) fn convert_module_memory(memory: wasmparser::MemoryType) -> MemoryType {
89 MemoryType::new(
90 if memory.memory64 { MemoryArch::I64 } else { MemoryArch::I32 },
91 memory.initial,
92 memory.maximum,
93 memory.page_size_log2.map(|x| 1 << x),
94 )
95}
96
97pub(crate) fn convert_module_table(table: wasmparser::Table<'_>) -> Result<TableType> {
98 let size_initial = table.ty.initial.try_into().map_err(|_| {

Callers 2

process_payloadMethod · 0.85
convert_module_importFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected