wasm/core/structure/modules/imports.rs
1use crate::{core::structure::modules::indices::TypeIdx, GlobalType, MemType, TableType};
2
3#[derive(Debug, Clone)]
4pub struct Import<'wasm> {
5 pub module_name: &'wasm str,
6 pub name: &'wasm str,
7 pub desc: ImportDesc,
8}
9
10#[derive(Debug, Clone)]
11pub enum ImportDesc {
12 Func(TypeIdx),
13 Table(TableType),
14 Mem(MemType),
15 Global(GlobalType),
16}