Update wasmparser for exception handling (#2431)

This commit is contained in:
Yury Delendik
2020-11-19 14:08:10 -06:00
committed by GitHub
parent 72811d35ae
commit e34b410381
16 changed files with 131 additions and 41 deletions

34
Cargo.lock generated
View File

@@ -586,7 +586,7 @@ dependencies = [
"smallvec", "smallvec",
"target-lexicon", "target-lexicon",
"thiserror", "thiserror",
"wasmparser 0.67.0", "wasmparser 0.68.0",
"wat", "wat",
] ]
@@ -1150,7 +1150,7 @@ dependencies = [
"smallvec", "smallvec",
"thiserror", "thiserror",
"typemap", "typemap",
"wasmparser 0.67.0", "wasmparser 0.68.0",
"wat", "wat",
] ]
@@ -2321,24 +2321,18 @@ checksum = "32fddd575d477c6e9702484139cf9f23dcd554b06d185ed0f56c857dd3a47aa6"
[[package]] [[package]]
name = "wasmparser" name = "wasmparser"
version = "0.66.0" version = "0.68.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c97fc0456d6d09ca7b64bc33c34f4e8f29d5ccfa8e5595ef7a8957818339e6f6" checksum = "29a00e14eed9c2ecbbdbdd4fb284f49d21b6808965de24769a6379a13ec47d4c"
[[package]]
name = "wasmparser"
version = "0.67.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f091cf3849e5fe76a60255bff169277459f2201435bc583b6656880553f0ad0"
[[package]] [[package]]
name = "wasmprinter" name = "wasmprinter"
version = "0.2.13" version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b580bee9eb1f029fac6014620b31f82ea2afa22d0701b9bd7f879747e3f5242" checksum = "f39a73b5f09cfcb1b568b61968d39b19e4ddec9b49040cfc091adf3b0788bca6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"wasmparser 0.66.0", "wasmparser 0.68.0",
] ]
[[package]] [[package]]
@@ -2357,7 +2351,7 @@ dependencies = [
"smallvec", "smallvec",
"target-lexicon", "target-lexicon",
"tempfile", "tempfile",
"wasmparser 0.67.0", "wasmparser 0.68.0",
"wasmtime-cache", "wasmtime-cache",
"wasmtime-environ", "wasmtime-environ",
"wasmtime-jit", "wasmtime-jit",
@@ -2435,7 +2429,7 @@ dependencies = [
"test-programs", "test-programs",
"tracing-subscriber", "tracing-subscriber",
"wasi-common", "wasi-common",
"wasmparser 0.67.0", "wasmparser 0.68.0",
"wasmtime", "wasmtime",
"wasmtime-cache", "wasmtime-cache",
"wasmtime-debug", "wasmtime-debug",
@@ -2471,7 +2465,7 @@ dependencies = [
"object", "object",
"target-lexicon", "target-lexicon",
"thiserror", "thiserror",
"wasmparser 0.67.0", "wasmparser 0.68.0",
"wasmtime-environ", "wasmtime-environ",
] ]
@@ -2490,7 +2484,7 @@ dependencies = [
"more-asserts", "more-asserts",
"serde", "serde",
"thiserror", "thiserror",
"wasmparser 0.67.0", "wasmparser 0.68.0",
] ]
[[package]] [[package]]
@@ -2518,7 +2512,7 @@ dependencies = [
"log", "log",
"rayon", "rayon",
"wasm-smith", "wasm-smith",
"wasmparser 0.67.0", "wasmparser 0.68.0",
"wasmprinter", "wasmprinter",
"wasmtime", "wasmtime",
"wasmtime-wast", "wasmtime-wast",
@@ -2545,7 +2539,7 @@ dependencies = [
"serde", "serde",
"target-lexicon", "target-lexicon",
"thiserror", "thiserror",
"wasmparser 0.67.0", "wasmparser 0.68.0",
"wasmtime-cranelift", "wasmtime-cranelift",
"wasmtime-debug", "wasmtime-debug",
"wasmtime-environ", "wasmtime-environ",
@@ -2562,7 +2556,7 @@ version = "0.21.0"
dependencies = [ dependencies = [
"cranelift-codegen", "cranelift-codegen",
"lightbeam", "lightbeam",
"wasmparser 0.67.0", "wasmparser 0.68.0",
"wasmtime-environ", "wasmtime-environ",
] ]

View File

@@ -43,7 +43,7 @@ libc = "0.2.60"
log = "0.4.8" log = "0.4.8"
rayon = "1.2.1" rayon = "1.2.1"
humantime = "2.0.0" humantime = "2.0.0"
wasmparser = "0.67" wasmparser = "0.68"
[dev-dependencies] [dev-dependencies]
env_logger = "0.8.1" env_logger = "0.8.1"

View File

@@ -12,7 +12,7 @@ keywords = ["webassembly", "wasm"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
wasmparser = { version = "0.67.0", default-features = false } wasmparser = { version = "0.68.0", default-features = false }
cranelift-codegen = { path = "../codegen", version = "0.68.0", default-features = false } cranelift-codegen = { path = "../codegen", version = "0.68.0", default-features = false }
cranelift-entity = { path = "../entity", version = "0.68.0" } cranelift-entity = { path = "../entity", version = "0.68.0" }
cranelift-frontend = { path = "../frontend", version = "0.68.0", default-features = false } cranelift-frontend = { path = "../frontend", version = "0.68.0", default-features = false }

View File

@@ -534,6 +534,17 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
state.popn(return_count); state.popn(return_count);
state.reachable = false; state.reachable = false;
} }
/********************************** Exception handing **********************************/
Operator::Try { .. }
| Operator::Catch
| Operator::BrOnExn { .. }
| Operator::Throw { .. }
| Operator::Rethrow => {
return Err(wasm_unsupported!(
"proposed exception handling operator {:?}",
op
));
}
/************************************ Calls **************************************** /************************************ Calls ****************************************
* The call instructions pop off their arguments from the stack and append their * The call instructions pop off their arguments from the stack and append their
* return values to it. `call_indirect` needs environment support because there is an * return values to it. `call_indirect` needs environment support because there is an

View File

@@ -8,8 +8,8 @@
use crate::state::FuncTranslationState; use crate::state::FuncTranslationState;
use crate::translation_utils::{ use crate::translation_utils::{
DataIndex, ElemIndex, EntityType, FuncIndex, Global, GlobalIndex, Memory, MemoryIndex, Table, DataIndex, ElemIndex, EntityType, Event, EventIndex, FuncIndex, Global, GlobalIndex, Memory,
TableIndex, TypeIndex, MemoryIndex, Table, TableIndex, TypeIndex,
}; };
use core::convert::From; use core::convert::From;
use core::convert::TryFrom; use core::convert::TryFrom;
@@ -44,6 +44,8 @@ pub enum WasmType {
FuncRef, FuncRef,
/// ExternRef type /// ExternRef type
ExternRef, ExternRef,
/// ExnRef type
ExnRef,
} }
impl TryFrom<wasmparser::Type> for WasmType { impl TryFrom<wasmparser::Type> for WasmType {
@@ -58,6 +60,7 @@ impl TryFrom<wasmparser::Type> for WasmType {
V128 => Ok(WasmType::V128), V128 => Ok(WasmType::V128),
FuncRef => Ok(WasmType::FuncRef), FuncRef => Ok(WasmType::FuncRef),
ExternRef => Ok(WasmType::ExternRef), ExternRef => Ok(WasmType::ExternRef),
ExnRef => Ok(WasmType::ExnRef),
EmptyBlockType | Func => Err(WasmError::InvalidWebAssembly { EmptyBlockType | Func => Err(WasmError::InvalidWebAssembly {
message: "unexpected value type".to_string(), message: "unexpected value type".to_string(),
offset: 0, offset: 0,
@@ -76,6 +79,7 @@ impl From<WasmType> for wasmparser::Type {
WasmType::V128 => wasmparser::Type::V128, WasmType::V128 => wasmparser::Type::V128,
WasmType::FuncRef => wasmparser::Type::FuncRef, WasmType::FuncRef => wasmparser::Type::FuncRef,
WasmType::ExternRef => wasmparser::Type::ExternRef, WasmType::ExternRef => wasmparser::Type::ExternRef,
WasmType::ExnRef => wasmparser::Type::ExnRef,
} }
} }
} }
@@ -689,6 +693,17 @@ pub trait ModuleEnvironment<'data>: TargetEnvironment {
field: &'data str, field: &'data str,
) -> WasmResult<()>; ) -> WasmResult<()>;
/// Declares an event import to the environment.
fn declare_event_import(
&mut self,
event: Event,
module: &'data str,
field: &'data str,
) -> WasmResult<()> {
drop((event, module, field));
Err(WasmError::Unsupported("wasm events".to_string()))
}
/// Declares a global import to the environment. /// Declares a global import to the environment.
fn declare_global_import( fn declare_global_import(
&mut self, &mut self,
@@ -751,6 +766,18 @@ pub trait ModuleEnvironment<'data>: TargetEnvironment {
/// Declares a memory to the environment /// Declares a memory to the environment
fn declare_memory(&mut self, memory: Memory) -> WasmResult<()>; fn declare_memory(&mut self, memory: Memory) -> WasmResult<()>;
/// Provides the number of defined events up front. By default this does nothing, but
/// implementations can use this to preallocate memory if desired.
fn reserve_events(&mut self, _num: u32) -> WasmResult<()> {
Ok(())
}
/// Declares an event to the environment
fn declare_event(&mut self, event: Event) -> WasmResult<()> {
drop(event);
Err(WasmError::Unsupported("wasm events".to_string()))
}
/// Provides the number of defined globals up front. By default this does nothing, but /// Provides the number of defined globals up front. By default this does nothing, but
/// implementations can use this to preallocate memory if desired. /// implementations can use this to preallocate memory if desired.
fn reserve_globals(&mut self, _num: u32) -> WasmResult<()> { fn reserve_globals(&mut self, _num: u32) -> WasmResult<()> {
@@ -780,6 +807,16 @@ pub trait ModuleEnvironment<'data>: TargetEnvironment {
name: &'data str, name: &'data str,
) -> WasmResult<()>; ) -> WasmResult<()>;
/// Declares an event export to the environment.
fn declare_event_export(
&mut self,
event_index: EventIndex,
name: &'data str,
) -> WasmResult<()> {
drop((event_index, name));
Err(WasmError::Unsupported("wasm events".to_string()))
}
/// Declares a global export to the environment. /// Declares a global export to the environment.
fn declare_global_export( fn declare_global_export(
&mut self, &mut self,

View File

@@ -2,9 +2,9 @@
//! to deal with each part of it. //! to deal with each part of it.
use crate::environ::{ModuleEnvironment, WasmResult}; use crate::environ::{ModuleEnvironment, WasmResult};
use crate::sections_translator::{ use crate::sections_translator::{
parse_data_section, parse_element_section, parse_export_section, parse_function_section, parse_data_section, parse_element_section, parse_event_section, parse_export_section,
parse_global_section, parse_import_section, parse_memory_section, parse_name_section, parse_function_section, parse_global_section, parse_import_section, parse_memory_section,
parse_start_section, parse_table_section, parse_type_section, parse_name_section, parse_start_section, parse_table_section, parse_type_section,
}; };
use crate::state::ModuleTranslationState; use crate::state::ModuleTranslationState;
use cranelift_codegen::timing; use cranelift_codegen::timing;
@@ -65,6 +65,11 @@ pub fn translate_module<'data>(
parse_memory_section(memories, environ)?; parse_memory_section(memories, environ)?;
} }
Payload::EventSection(events) => {
validator.event_section(&events)?;
parse_event_section(events, environ)?;
}
Payload::GlobalSection(globals) => { Payload::GlobalSection(globals) => {
validator.global_section(&globals)?; validator.global_section(&globals)?;
parse_global_section(globals, environ)?; parse_global_section(globals, environ)?;

View File

@@ -10,8 +10,9 @@
use crate::environ::{ModuleEnvironment, WasmError, WasmResult}; use crate::environ::{ModuleEnvironment, WasmError, WasmResult};
use crate::state::ModuleTranslationState; use crate::state::ModuleTranslationState;
use crate::translation_utils::{ use crate::translation_utils::{
tabletype_to_type, type_to_type, DataIndex, ElemIndex, EntityType, FuncIndex, Global, tabletype_to_type, type_to_type, DataIndex, ElemIndex, EntityType, Event, EventIndex,
GlobalIndex, GlobalInit, Memory, MemoryIndex, Table, TableElementType, TableIndex, TypeIndex, FuncIndex, Global, GlobalIndex, GlobalInit, Memory, MemoryIndex, Table, TableElementType,
TableIndex, TypeIndex,
}; };
use crate::wasm_unsupported; use crate::wasm_unsupported;
use core::convert::TryFrom; use core::convert::TryFrom;
@@ -24,10 +25,10 @@ use std::boxed::Box;
use std::vec::Vec; use std::vec::Vec;
use wasmparser::{ use wasmparser::{
self, Data, DataKind, DataSectionReader, Element, ElementItem, ElementItems, ElementKind, self, Data, DataKind, DataSectionReader, Element, ElementItem, ElementItems, ElementKind,
ElementSectionReader, Export, ExportSectionReader, ExternalKind, FunctionSectionReader, ElementSectionReader, EventSectionReader, EventType, Export, ExportSectionReader, ExternalKind,
GlobalSectionReader, GlobalType, ImportSectionEntryType, ImportSectionReader, FunctionSectionReader, GlobalSectionReader, GlobalType, ImportSectionEntryType,
MemorySectionReader, MemoryType, NameSectionReader, Naming, Operator, TableSectionReader, ImportSectionReader, MemorySectionReader, MemoryType, NameSectionReader, Naming, Operator,
TableType, TypeDef, TypeSectionReader, TableSectionReader, TableType, TypeDef, TypeSectionReader,
}; };
fn entity_type( fn entity_type(
@@ -39,6 +40,7 @@ fn entity_type(
ImportSectionEntryType::Module(sig) => EntityType::Module(TypeIndex::from_u32(sig)), ImportSectionEntryType::Module(sig) => EntityType::Module(TypeIndex::from_u32(sig)),
ImportSectionEntryType::Instance(sig) => EntityType::Instance(TypeIndex::from_u32(sig)), ImportSectionEntryType::Instance(sig) => EntityType::Instance(TypeIndex::from_u32(sig)),
ImportSectionEntryType::Memory(ty) => EntityType::Memory(memory(ty)), ImportSectionEntryType::Memory(ty) => EntityType::Memory(memory(ty)),
ImportSectionEntryType::Event(evt) => EntityType::Event(event(evt)),
ImportSectionEntryType::Global(ty) => { ImportSectionEntryType::Global(ty) => {
EntityType::Global(global(ty, environ, GlobalInit::Import)?) EntityType::Global(global(ty, environ, GlobalInit::Import)?)
} }
@@ -58,6 +60,12 @@ fn memory(ty: MemoryType) -> Memory {
} }
} }
fn event(e: EventType) -> Event {
Event {
ty: TypeIndex::from_u32(e.type_index),
}
}
fn table(ty: TableType, environ: &mut dyn ModuleEnvironment<'_>) -> WasmResult<Table> { fn table(ty: TableType, environ: &mut dyn ModuleEnvironment<'_>) -> WasmResult<Table> {
Ok(Table { Ok(Table {
wasm_ty: ty.element_type.try_into()?, wasm_ty: ty.element_type.try_into()?,
@@ -163,6 +171,7 @@ pub fn parse_import_section<'data>(
EntityType::Memory(ty) => { EntityType::Memory(ty) => {
environ.declare_memory_import(ty, module_name, field_name)?; environ.declare_memory_import(ty, module_name, field_name)?;
} }
EntityType::Event(e) => environ.declare_event_import(e, module_name, field_name)?,
EntityType::Global(ty) => { EntityType::Global(ty) => {
environ.declare_global_import(ty, module_name, field_name)?; environ.declare_global_import(ty, module_name, field_name)?;
} }
@@ -227,6 +236,21 @@ pub fn parse_memory_section(
Ok(()) Ok(())
} }
/// Parses the Event section of the wasm module.
pub fn parse_event_section(
events: EventSectionReader,
environ: &mut dyn ModuleEnvironment,
) -> WasmResult<()> {
environ.reserve_events(events.get_count())?;
for entry in events {
let event = event(entry?);
environ.declare_event(event)?;
}
Ok(())
}
/// Parses the Global section of the wasm module. /// Parses the Global section of the wasm module.
pub fn parse_global_section( pub fn parse_global_section(
globals: GlobalSectionReader, globals: GlobalSectionReader,
@@ -290,6 +314,7 @@ pub fn parse_export_section<'data>(
ExternalKind::Memory => { ExternalKind::Memory => {
environ.declare_memory_export(MemoryIndex::new(index), field)? environ.declare_memory_export(MemoryIndex::new(index), field)?
} }
ExternalKind::Event => environ.declare_event_export(EventIndex::new(index), field)?,
ExternalKind::Global => { ExternalKind::Global => {
environ.declare_global_export(GlobalIndex::new(index), field)? environ.declare_global_export(GlobalIndex::new(index), field)?
} }

View File

@@ -91,6 +91,12 @@ entity_impl!(ModuleIndex);
pub struct InstanceIndex(u32); pub struct InstanceIndex(u32);
entity_impl!(InstanceIndex); entity_impl!(InstanceIndex);
/// Index type of an event inside the WebAssembly module.
#[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Debug)]
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub struct EventIndex(u32);
entity_impl!(EventIndex);
/// An index of an entity. /// An index of an entity.
#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)] #[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
@@ -119,6 +125,8 @@ pub enum EntityType {
Global(Global), Global(Global),
/// A linear memory with the specified limits /// A linear memory with the specified limits
Memory(Memory), Memory(Memory),
/// An event definition.
Event(Event),
/// A table with the specified element type and limits /// A table with the specified element type and limits
Table(Table), Table(Table),
/// A function type where the index points to the type section and records a /// A function type where the index points to the type section and records a
@@ -212,6 +220,14 @@ pub struct Memory {
pub shared: bool, pub shared: bool,
} }
/// WebAssembly event.
#[derive(Debug, Clone, Copy, Hash, Eq, PartialEq)]
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub struct Event {
/// The event signature type.
pub ty: TypeIndex,
}
/// Helper function translating wasmparser types to Cranelift types when possible. /// Helper function translating wasmparser types to Cranelift types when possible.
pub fn type_to_type<PE: TargetEnvironment + ?Sized>( pub fn type_to_type<PE: TargetEnvironment + ?Sized>(
ty: wasmparser::Type, ty: wasmparser::Type,

View File

@@ -13,7 +13,7 @@ edition = "2018"
[dependencies] [dependencies]
gimli = "0.23.0" gimli = "0.23.0"
wasmparser = "0.67.0" wasmparser = "0.68.0"
object = { version = "0.22.0", default-features = false, features = ["read", "write"] } object = { version = "0.22.0", default-features = false, features = ["read", "write"] }
wasmtime-environ = { path = "../environ", version = "0.21.0" } wasmtime-environ = { path = "../environ", version = "0.21.0" }
target-lexicon = { version = "0.11.0", default-features = false } target-lexicon = { version = "0.11.0", default-features = false }

View File

@@ -16,7 +16,7 @@ anyhow = "1.0"
cranelift-codegen = { path = "../../cranelift/codegen", version = "0.68.0", features = ["enable-serde"] } cranelift-codegen = { path = "../../cranelift/codegen", version = "0.68.0", features = ["enable-serde"] }
cranelift-entity = { path = "../../cranelift/entity", version = "0.68.0", features = ["enable-serde"] } cranelift-entity = { path = "../../cranelift/entity", version = "0.68.0", features = ["enable-serde"] }
cranelift-wasm = { path = "../../cranelift/wasm", version = "0.68.0", features = ["enable-serde"] } cranelift-wasm = { path = "../../cranelift/wasm", version = "0.68.0", features = ["enable-serde"] }
wasmparser = "0.67.0" wasmparser = "0.68.0"
indexmap = { version = "1.0.2", features = ["serde-1"] } indexmap = { version = "1.0.2", features = ["serde-1"] }
thiserror = "1.0.4" thiserror = "1.0.4"
serde = { version = "1.0.94", features = ["derive"] } serde = { version = "1.0.94", features = ["derive"] }

View File

@@ -12,8 +12,8 @@ arbitrary = { version = "0.4.1", features = ["derive"] }
env_logger = "0.8.1" env_logger = "0.8.1"
log = "0.4.8" log = "0.4.8"
rayon = "1.2.1" rayon = "1.2.1"
wasmparser = "0.67.0" wasmparser = "0.68.0"
wasmprinter = "0.2.13" wasmprinter = "0.2.15"
wasmtime = { path = "../wasmtime" } wasmtime = { path = "../wasmtime" }
wasmtime-wast = { path = "../wast" } wasmtime-wast = { path = "../wast" }
wasm-smith = "0.1.10" wasm-smith = "0.1.10"

View File

@@ -28,7 +28,7 @@ rayon = { version = "1.0", optional = true }
region = "2.1.0" region = "2.1.0"
thiserror = "1.0.4" thiserror = "1.0.4"
target-lexicon = { version = "0.11.0", default-features = false } target-lexicon = { version = "0.11.0", default-features = false }
wasmparser = "0.67.0" wasmparser = "0.68.0"
more-asserts = "0.2.1" more-asserts = "0.2.1"
anyhow = "1.0" anyhow = "1.0"
cfg-if = "1.0" cfg-if = "1.0"

View File

@@ -24,7 +24,7 @@ more-asserts = "0.2.1"
smallvec = "1.0.0" smallvec = "1.0.0"
thiserror = "1.0.9" thiserror = "1.0.9"
typemap = "0.3" typemap = "0.3"
wasmparser = "0.67.0" wasmparser = "0.68.0"
[dev-dependencies] [dev-dependencies]
lazy_static = "1.2" lazy_static = "1.2"

View File

@@ -13,6 +13,6 @@ edition = "2018"
[dependencies] [dependencies]
lightbeam = { path = "..", version = "0.21.0" } lightbeam = { path = "..", version = "0.21.0" }
wasmparser = "0.67" wasmparser = "0.68"
cranelift-codegen = { path = "../../../cranelift/codegen", version = "0.68.0" } cranelift-codegen = { path = "../../../cranelift/codegen", version = "0.68.0" }
wasmtime-environ = { path = "../../environ", version = "0.21.0" } wasmtime-environ = { path = "../../environ", version = "0.21.0" }

View File

@@ -16,7 +16,7 @@ wasmtime-jit = { path = "../jit", version = "0.21.0" }
wasmtime-cache = { path = "../cache", version = "0.21.0", optional = true } wasmtime-cache = { path = "../cache", version = "0.21.0", optional = true }
wasmtime-profiling = { path = "../profiling", version = "0.21.0" } wasmtime-profiling = { path = "../profiling", version = "0.21.0" }
target-lexicon = { version = "0.11.0", default-features = false } target-lexicon = { version = "0.11.0", default-features = false }
wasmparser = "0.67.0" wasmparser = "0.68.0"
anyhow = "1.0.19" anyhow = "1.0.19"
region = "2.2.0" region = "2.2.0"
libc = "0.2" libc = "0.2"

View File

@@ -133,6 +133,7 @@ impl ValType {
wasm::WasmType::V128 => Self::V128, wasm::WasmType::V128 => Self::V128,
wasm::WasmType::FuncRef => Self::FuncRef, wasm::WasmType::FuncRef => Self::FuncRef,
wasm::WasmType::ExternRef => Self::ExternRef, wasm::WasmType::ExternRef => Self::ExternRef,
wasm::WasmType::ExnRef => unimplemented!(),
} }
} }
} }
@@ -222,6 +223,7 @@ impl ExternType {
}; };
InstanceType::from_wasmtime(module, exports).into() InstanceType::from_wasmtime(module, exports).into()
} }
EntityType::Event(_) => unimplemented!("wasm event support"),
} }
} }
} }