diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2023-12-01 14:06:05 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2023-12-01 14:06:05 +0100 |
| commit | b9b517375c1f8c50c0096ef61d2395decf071914 (patch) | |
| tree | c524ed3cd702a2c7b261e8bdfac59887b1ca5c4e /crates/parser/src | |
| parent | 871398ff821255debdbd9452e46ca55a05e8cb92 (diff) | |
chore: move TinyWasmModule to types
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/parser/src')
| -rw-r--r-- | crates/parser/src/lib.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs index 39bb1c6..d2b6d9c 100644 --- a/crates/parser/src/lib.rs +++ b/crates/parser/src/lib.rs @@ -9,10 +9,9 @@ extern crate std; mod conversion; mod error; mod module; -use alloc::boxed::Box; pub use error::*; use module::ModuleReader; -use tinywasm_types::{Export, FuncType, Function}; +use tinywasm_types::TinyWasmModule; pub struct Parser {} @@ -45,21 +44,6 @@ impl Parser { } } -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>>, -} - impl TryFrom<ModuleReader<'_>> for TinyWasmModule { type Error = ParseError; |
