diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2024-01-16 18:06:49 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2024-01-16 18:06:49 +0100 |
| commit | 22f7425bf0b72d04b764fa636d79f7aeb7b12e3e (patch) | |
| tree | eb1db3c1b81c19fb8e0c4c9f17e940ee7f5c82c8 /crates/types | |
| parent | d64ed2b7ec2d025914197a467d5529acb8cc5b4a (diff) | |
feat: initial linking
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/types')
| -rw-r--r-- | crates/types/src/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs index 00ccdfa..63f0133 100644 --- a/crates/types/src/lib.rs +++ b/crates/types/src/lib.rs @@ -442,6 +442,17 @@ pub enum ImportKind { Global(GlobalType), } +impl From<&ImportKind> for ExternalKind { + fn from(kind: &ImportKind) -> Self { + match kind { + ImportKind::Func(_) => Self::Func, + ImportKind::Table(_) => Self::Table, + ImportKind::Mem(_) => Self::Memory, + ImportKind::Global(_) => Self::Global, + } + } +} + #[derive(Debug, Clone)] pub struct Data { pub data: Box<[u8]>, |
