summaryrefslogtreecommitdiff
path: root/crates/types/src
diff options
context:
space:
mode:
authorHenry Gressmann <mail@henrygressmann.de>2023-12-01 14:06:05 +0100
committerHenry Gressmann <mail@henrygressmann.de>2023-12-01 14:06:05 +0100
commitb9b517375c1f8c50c0096ef61d2395decf071914 (patch)
treec524ed3cd702a2c7b261e8bdfac59887b1ca5c4e /crates/types/src
parent871398ff821255debdbd9452e46ca55a05e8cb92 (diff)
chore: move TinyWasmModule to types
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/types/src')
-rw-r--r--crates/types/src/lib.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs
index e68efe7..e793b26 100644
--- a/crates/types/src/lib.rs
+++ b/crates/types/src/lib.rs
@@ -3,6 +3,21 @@ extern crate alloc;
mod instructions;
pub use instructions::*;
+pub struct TinyWasmModule {
+ pub version: Option<u16>,
+ pub start_func: Option<u32>,
+
+ pub types: Option<Box<[FuncType]>>,
+ pub funcs: Option<Box<[Function]>>,
+ pub exports: Option<Box<[Export]>>,
+ // pub tables: Option<TableType>,
+ // pub memories: Option<MemoryType>,
+ // pub globals: Option<GlobalType>,
+ // pub elements: Option<ElementSectionReader<'a>>,
+ // pub imports: Option<ImportSectionReader<'a>>,
+ // pub data_segments: Option<DataSectionReader<'a>>,
+}
+
/// A WebAssembly value.
/// See https://webassembly.github.io/spec/core/syntax/types.html#value-types
#[derive(Debug, Clone, PartialEq)]