tinywasm 0.11.0-beta.0

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

/// 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<Shared<[u8]>>,
}

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