From b9b517375c1f8c50c0096ef61d2395decf071914 Mon Sep 17 00:00:00 2001 From: Henry Gressmann Date: Fri, 1 Dec 2023 14:06:05 +0100 Subject: chore: move TinyWasmModule to types Signed-off-by: Henry Gressmann --- crates/types/Cargo.toml | 2 ++ crates/types/src/lib.rs | 15 +++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'crates/types') diff --git a/crates/types/Cargo.toml b/crates/types/Cargo.toml index 83263a6..fa2fc6e 100644 --- a/crates/types/Cargo.toml +++ b/crates/types/Cargo.toml @@ -5,7 +5,9 @@ edition="2021" [dependencies] tracing={version="0.1.38", default-features=false} # logging +rkyv={version="0.7", optional=true, default-features=false} [features] default=["std"] std=[] +serialize=["dep:rkyv"] 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, + pub start_func: Option, + + pub types: Option>, + pub funcs: Option>, + pub exports: Option>, + // pub tables: Option, + // pub memories: Option, + // pub globals: Option, + // pub elements: Option>, + // pub imports: Option>, + // pub data_segments: Option>, +} + /// A WebAssembly value. /// See https://webassembly.github.io/spec/core/syntax/types.html#value-types #[derive(Debug, Clone, PartialEq)] -- cgit v1.3.1