1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

impl<'a, 'i> IntoWasm<'a, Global<'i>> for WasmVariable
where
    'a: 'i,
{
    fn as_wast(&'a self) -> Global<'i> {
        Global {
            span: Span::from_offset(0),
            id: WasmName::id(self.symbol.as_ref()),
            name: None,
            exports: self.export.as_wast(),
            ty: GlobalType { ty: self.r#type.as_wast(), mutable: self.mutable },
            kind: GlobalKind::Inline(self.as_wast()),
        }
    }
}