wasmi::memory_units
pub fn size_of<T>() -> Bytes
Returns the size of a type in Bytes.
Bytes
#[repr(C)] struct Hello { a: u32, b: u32, } assert_eq!(size_of::<Hello>(), Bytes(4 + 4));