tinywasm 0.10.0

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

/// A WebAssembly Global Instance
///
/// See <https://webassembly.github.io/spec/core/exec/runtime.html#global-instances>
#[cfg_attr(feature = "debug", derive(Debug))]
pub(crate) struct GlobalInstance {
    pub(crate) value: TinyWasmValue,
    pub(crate) ty: GlobalType,
}

impl GlobalInstance {
    pub(crate) fn new(ty: GlobalType, value: TinyWasmValue) -> Self {
        Self { ty, value }
    }
}