wasm_module: create WasmModule::new for testing

This commit is contained in:
Brian Carroll 2022-11-21 18:24:49 +00:00
parent 2ca74e5070
commit 26cce05bbe
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
5 changed files with 133 additions and 6 deletions

View file

@ -6,6 +6,7 @@ use std::fmt::Debug;
/// In practice, this saves space, since small numbers used more often than large numbers.
/// Of course there is a price for this - an encoded U32 can be up to 5 bytes wide.
pub const MAX_SIZE_ENCODED_U32: usize = 5;
pub const MAX_SIZE_ENCODED_U64: usize = 10;
pub trait Serialize {
fn serialize<T: SerialBuffer>(&self, buffer: &mut T);