summaryrefslogtreecommitdiff
path: root/crates/parser/src/lib.rs
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2023-12-18 15:01:30 +0100
committerHenry Gressmann <mail@henrygressmann.de>2023-12-18 15:01:30 +0100
commit8f33b67404160ce8cf35a22c0d0993112b5abe9c (patch)
treea94aa18a777d4d47c1b5dbc25abe0851883938c2 /crates/parser/src/lib.rs
parent45c740b7d7553d3016cf5c73b891f512a9975afe (diff)
feat: global parsing, improve testsuite
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/parser/src/lib.rs')
-rw-r--r--crates/parser/src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs
index 0719c96..bcaef76 100644
--- a/crates/parser/src/lib.rs
+++ b/crates/parser/src/lib.rs
@@ -114,12 +114,15 @@ impl TryFrom<ModuleReader> for TinyWasmModule {
})
.collect::<Vec<_>>();
+ let globals = reader.global_section;
+
Ok(TinyWasmModule {
version: reader.version,
start_func: reader.start_func,
types: reader.type_section.into_boxed_slice(),
funcs: funcs.into_boxed_slice(),
exports: reader.export_section.into_boxed_slice(),
+ globals: globals.into_boxed_slice(),
})
}
}