tinywasm 0.10.0

A tiny WebAssembly interpreter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use alloc::vec::Vec;

/// A WebAssembly Data Instance
///
/// See <https://webassembly.github.io/spec/core/exec/runtime.html#data-instances>
#[cfg_attr(feature = "debug", derive(Debug))]
pub(crate) struct DataInstance {
    pub(crate) data: Option<Vec<u8>>,
}

impl DataInstance {
    pub(crate) fn drop(&mut self) {
        self.data.take();
    }
}