diff --git a/src/interpreter/host.rs b/src/interpreter/host.rs index 93cb62e..86e448f 100644 --- a/src/interpreter/host.rs +++ b/src/interpreter/host.rs @@ -44,15 +44,15 @@ pub trait Externals { fn check_signature(&self, index: HostFuncIndex, signature: &FunctionType) -> bool; } -pub struct EmptyExternals; +pub struct NopExternals; -impl Externals for EmptyExternals { +impl Externals for NopExternals { fn invoke_index( &mut self, _index: HostFuncIndex, _args: &[RuntimeValue], ) -> Result, Error> { - Err(Error::Trap("invoke index on empty externals".into())) + Err(Error::Trap("invoke index on no-op externals".into())) } fn check_signature(&self, _index: HostFuncIndex, _signature: &FunctionType) -> bool { diff --git a/src/interpreter/mod.rs b/src/interpreter/mod.rs index df04fee..b95296c 100644 --- a/src/interpreter/mod.rs +++ b/src/interpreter/mod.rs @@ -123,7 +123,7 @@ pub use self::memory::{MemoryInstance, MemoryRef}; pub use self::table::{TableInstance, TableRef}; pub use self::program::ProgramInstance; pub use self::value::{RuntimeValue, TryInto}; -pub use self::host::{Externals, HostFuncIndex, EmptyExternals, HostError}; +pub use self::host::{Externals, HostFuncIndex, NopExternals, HostError}; pub use self::imports::{ImportResolver, Imports}; pub use self::module::{ModuleInstance, ModuleRef, ExternVal}; pub use self::global::{GlobalInstance, GlobalRef};