From fc87e4bd60029f821eb87f4571b38538862549c2 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 25 May 2023 11:53:18 +0200 Subject: [PATCH 1/4] Removed all deprecated functions --- lib/api/src/engine.rs | 99 +-------------------------- lib/api/src/exports.rs | 17 ----- lib/api/src/externals/function.rs | 46 ------------- lib/api/src/lib.rs | 9 --- lib/api/src/store.rs | 55 --------------- lib/compiler-cranelift/src/config.rs | 4 -- lib/compiler-llvm/src/config.rs | 4 -- lib/compiler-singlepass/src/config.rs | 4 -- lib/compiler/src/compiler.rs | 10 --- lib/vm/src/instance/mod.rs | 7 -- lib/vm/src/lib.rs | 9 +-- lib/wasi/src/lib.rs | 4 -- 12 files changed, 2 insertions(+), 266 deletions(-) diff --git a/lib/api/src/engine.rs b/lib/api/src/engine.rs index 67fbc45f238..e8b0d34e46b 100644 --- a/lib/api/src/engine.rs +++ b/lib/api/src/engine.rs @@ -13,9 +13,7 @@ use std::sync::Arc; #[cfg(feature = "sys")] pub use wasmer_compiler::{Artifact, CompilerConfig, EngineInner, Features, Tunables}; #[cfg(feature = "sys")] -use wasmer_types::{CompileError, DeserializeError, FunctionType, Target}; -#[cfg(feature = "sys")] -use wasmer_vm::VMSharedSignatureIndex; +use wasmer_types::{DeserializeError, Target}; #[cfg(feature = "js")] use crate::js::engine as engine_imp; @@ -26,39 +24,17 @@ pub(crate) use crate::js::engine::default_engine; use crate::jsc::engine as engine_imp; #[cfg(feature = "jsc")] pub(crate) use crate::jsc::engine::default_engine; -#[cfg(feature = "sys")] -type EngineId = str; /// The engine type #[derive(Clone, Debug)] pub struct Engine(pub(crate) engine_imp::Engine); impl Engine { - #[deprecated( - since = "3.2.0", - note = "engine.cloned() has been deprecated in favor of engine.clone()" - )] - /// Returns the [`Engine`]. - pub fn cloned(&self) -> Self { - self.clone() - } - /// Returns the deterministic id of this engine pub fn deterministic_id(&self) -> &str { self.0.deterministic_id() } - #[deprecated(since = "3.2.0")] - #[cfg(all(feature = "compiler", feature = "sys"))] - /// Create a new `Engine` with the given config - pub fn new( - compiler_config: Box, - target: Target, - features: Features, - ) -> Self { - Self(engine_imp::Engine::new(compiler_config, target, features)) - } - #[cfg(feature = "sys")] /// Create a headless `Engine` /// Will be removed in 4.0 in favor of the NativeEngineExt trait @@ -66,20 +42,6 @@ impl Engine { Self(engine_imp::Engine::headless()) } - #[deprecated(since = "3.2.0")] - #[cfg(feature = "sys")] - /// Get reference to `EngineInner`. - pub fn inner(&self) -> std::sync::MutexGuard<'_, EngineInner> { - self.0.inner() - } - - #[deprecated(since = "3.2.0")] - #[cfg(feature = "sys")] - /// Get mutable reference to `EngineInner`. - pub fn inner_mut(&self) -> std::sync::MutexGuard<'_, EngineInner> { - self.0.inner_mut() - } - #[cfg(feature = "sys")] /// Gets the target /// Will be removed in 4.0 in favor of the NativeEngineExt trait @@ -87,54 +49,6 @@ impl Engine { self.0.target() } - #[deprecated(since = "3.2.0")] - #[cfg(feature = "sys")] - /// Register a signature - #[cfg(not(target_arch = "wasm32"))] - pub fn register_signature(&self, func_type: &FunctionType) -> VMSharedSignatureIndex { - let compiler = self.0.inner(); - compiler.signatures().register(func_type) - } - - #[deprecated(since = "3.2.0")] - #[cfg(feature = "sys")] - /// Lookup a signature - #[cfg(not(target_arch = "wasm32"))] - pub fn lookup_signature(&self, sig: VMSharedSignatureIndex) -> Option { - let compiler = self.0.inner(); - compiler.signatures().lookup(sig) - } - - #[deprecated(since = "3.2.0")] - #[cfg(feature = "sys")] - /// Validates a WebAssembly module - #[cfg(feature = "compiler")] - pub fn validate(&self, binary: &[u8]) -> Result<(), CompileError> { - self.0.inner().validate(binary) - } - - #[deprecated(since = "3.2.0")] - #[cfg(all(feature = "sys", feature = "compiler"))] - #[cfg(not(target_arch = "wasm32"))] - /// Compile a WebAssembly binary - pub fn compile(&self, binary: &[u8]) -> Result, CompileError> { - Ok(Arc::new(Artifact::new(&self.0, binary, self.0.tunables())?)) - } - - #[deprecated(since = "3.2.0")] - #[cfg(all(feature = "sys", not(feature = "compiler")))] - #[cfg(not(target_arch = "wasm32"))] - /// Compile a WebAssembly binary - pub fn compile( - &self, - _binary: &[u8], - _tunables: &dyn Tunables, - ) -> Result, CompileError> { - Err(CompileError::Codegen( - "The Engine is operating in headless mode, so it can not compile Modules.".to_string(), - )) - } - #[cfg(all(feature = "sys", not(target_arch = "wasm32")))] /// Deserializes a WebAssembly module which was previously serialized with /// `Module::serialize`. @@ -197,17 +111,6 @@ impl Engine { Ok(Arc::new(Artifact::deserialize(&self.0, buffer.as_slice())?)) } - #[deprecated(since = "3.2.0", note = "Use Engine::deterministic_id()")] - #[cfg(all(feature = "sys", not(target_arch = "wasm32")))] - /// A unique identifier for this object. - /// - /// This exists to allow us to compare two Engines for equality. Otherwise, - /// comparing two trait objects unsafely relies on implementation details - /// of trait representation. - pub fn id(&self) -> &EngineId { - self.deterministic_id() - } - #[cfg(all(feature = "sys", not(target_arch = "wasm32")))] /// Attach a Tunable to this engine /// Will be removed in 4.0 in favor of the NativeEngineExt trait diff --git a/lib/api/src/exports.rs b/lib/api/src/exports.rs index a9304341f7c..e6eecf7e301 100644 --- a/lib/api/src/exports.rs +++ b/lib/api/src/exports.rs @@ -132,23 +132,6 @@ impl Exports { self.get(name) } - #[deprecated( - since = "3.0.0", - note = "get_native_function() has been renamed to get_typed_function(), just like NativeFunc has been renamed to TypedFunction." - )] - /// Get an export as a `TypedFunction`. - pub fn get_native_function( - &self, - store: &impl AsStoreRef, - name: &str, - ) -> Result, ExportError> - where - Args: WasmTypeList, - Rets: WasmTypeList, - { - self.get_typed_function(store, name) - } - /// Get an export as a `TypedFunction`. pub fn get_typed_function( &self, diff --git a/lib/api/src/externals/function.rs b/lib/api/src/externals/function.rs index 48ac7eff2a8..70d18c3ca48 100644 --- a/lib/api/src/externals/function.rs +++ b/lib/api/src/externals/function.rs @@ -156,20 +156,6 @@ impl Function { Self(function_impl::Function::new_with_env(store, env, ty, func)) } - #[deprecated( - since = "3.0.0", - note = "new_native() has been renamed to new_typed()." - )] - /// Creates a new host `Function` from a native function. - pub fn new_native(store: &mut impl AsStoreMut, func: F) -> Self - where - F: HostFunction<(), Args, Rets, WithoutEnv> + 'static + Send + Sync, - Args: WasmTypeList, - Rets: WasmTypeList, - { - Self::new_typed(store, func) - } - /// Creates a new host `Function` from a native function. pub fn new_typed(store: &mut impl AsStoreMut, func: F) -> Self where @@ -180,24 +166,6 @@ impl Function { Self(function_impl::Function::new_typed(store, func)) } - #[deprecated( - since = "3.0.0", - note = "new_native_with_env() has been renamed to new_typed_with_env()." - )] - /// Creates a new host `Function` with an environment from a native function. - pub fn new_native_with_env( - store: &mut impl AsStoreMut, - env: &FunctionEnv, - func: F, - ) -> Self - where - F: HostFunction + 'static + Send + Sync, - Args: WasmTypeList, - Rets: WasmTypeList, - { - Self::new_typed_with_env(store, env, func) - } - /// Creates a new host `Function` with an environment from a typed function. /// /// The function signature is automatically retrieved using the @@ -352,20 +320,6 @@ impl Function { Self(function_impl::Function::from_vm_funcref(store, funcref)) } - /// Transform this WebAssembly function into a native function. - /// See [`TypedFunction`] to learn more. - #[deprecated(since = "3.0.0", note = "native() has been renamed to typed().")] - pub fn native( - &self, - store: &impl AsStoreRef, - ) -> Result, RuntimeError> - where - Args: WasmTypeList, - Rets: WasmTypeList, - { - self.typed(store) - } - /// Transform this WebAssembly function into a typed function. /// See [`TypedFunction`] to learn more. /// diff --git a/lib/api/src/lib.rs b/lib/api/src/lib.rs index 5fbe355fb3a..8f3fdf9882e 100644 --- a/lib/api/src/lib.rs +++ b/lib/api/src/lib.rs @@ -502,14 +502,5 @@ pub use wat::parse_bytes as wat2wasm; #[cfg(feature = "wasmparser")] pub use wasmparser; -// Deprecated types - -/// This type is deprecated, it has been replaced by TypedFunction. -#[deprecated( - since = "3.0.0", - note = "NativeFunc has been replaced by TypedFunction" -)] -pub type NativeFunc = TypedFunction; - /// Version number of this crate. pub const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/lib/api/src/store.rs b/lib/api/src/store.rs index 4ebc1ee2ef5..3dea7e620a0 100644 --- a/lib/api/src/store.rs +++ b/lib/api/src/store.rs @@ -75,47 +75,12 @@ impl Store { } } - #[deprecated( - since = "3.0.0", - note = "Store::new_with_engine has been deprecated in favor of Store::new" - )] - /// Creates a new `Store` with a specific [`Engine`]. - pub fn new_with_engine(engine: impl Into) -> Self { - Self::new(engine) - } - #[cfg(feature = "sys")] /// Set the trap handler in this store. pub fn set_trap_handler(&mut self, handler: Option>>) { self.inner.trap_handler = handler; } - #[cfg(feature = "sys")] - #[deprecated( - since = "3.2.0", - note = "store.new_with_tunables() has been deprecated in favor of engine.set_tunables()" - )] - /// Creates a new `Store` with a specific [`Engine`] and [`Tunables`]. - pub fn new_with_tunables( - engine: impl Into, - tunables: impl Tunables + Send + Sync + 'static, - ) -> Self { - let mut engine = engine.into(); - engine.set_tunables(tunables); - - Self::new(engine) - } - - #[cfg(feature = "sys")] - #[deprecated( - since = "3.2.0", - note = "store.tunables() has been deprecated in favor of store.engine().tunables()" - )] - /// Returns the [`Tunables`]. - pub fn tunables(&self) -> &dyn Tunables { - self.inner.engine.tunables() - } - /// Returns the [`Engine`]. pub fn engine(&self) -> &Engine { &self.inner.engine @@ -201,16 +166,6 @@ impl<'a> StoreRef<'a> { &self.inner.objects } - #[cfg(feature = "sys")] - #[deprecated( - since = "3.2.0", - note = "store.tunables() has been deprecated in favor of store.engine().tunables()" - )] - /// Returns the [`Tunables`]. - pub fn tunables(&self) -> &dyn Tunables { - self.inner.engine.tunables() - } - /// Returns the [`Engine`]. pub fn engine(&self) -> &Engine { &self.inner.engine @@ -239,16 +194,6 @@ pub struct StoreMut<'a> { } impl<'a> StoreMut<'a> { - /// Returns the [`Tunables`]. - #[cfg(feature = "sys")] - #[deprecated( - since = "3.2.0", - note = "store.tunables() has been deprecated in favor of store.engine().tunables()" - )] - pub fn tunables(&self) -> &dyn Tunables { - self.inner.engine.tunables() - } - /// Returns the [`Engine`]. pub fn engine(&self) -> &Engine { &self.inner.engine diff --git a/lib/compiler-cranelift/src/config.rs b/lib/compiler-cranelift/src/config.rs index e3c533b80fd..0ce14a4cebe 100644 --- a/lib/compiler-cranelift/src/config.rs +++ b/lib/compiler-cranelift/src/config.rs @@ -209,10 +209,6 @@ impl CompilerConfig for Cranelift { self.enable_verifier = true; } - fn enable_nan_canonicalization(&mut self) { - self.enable_nan_canonicalization = true; - } - fn canonicalize_nans(&mut self, enable: bool) { self.enable_nan_canonicalization = enable; } diff --git a/lib/compiler-llvm/src/config.rs b/lib/compiler-llvm/src/config.rs index 928dd9fe53b..a4c5ebf6e1c 100644 --- a/lib/compiler-llvm/src/config.rs +++ b/lib/compiler-llvm/src/config.rs @@ -259,10 +259,6 @@ impl CompilerConfig for LLVM { self.enable_verifier = true; } - fn enable_nan_canonicalization(&mut self) { - self.enable_nan_canonicalization = true; - } - fn canonicalize_nans(&mut self, enable: bool) { self.enable_nan_canonicalization = enable; } diff --git a/lib/compiler-singlepass/src/config.rs b/lib/compiler-singlepass/src/config.rs index b5e1e0f29c2..ea01ebb6dec 100644 --- a/lib/compiler-singlepass/src/config.rs +++ b/lib/compiler-singlepass/src/config.rs @@ -23,10 +23,6 @@ impl Singlepass { } } - fn enable_nan_canonicalization(&mut self) { - self.enable_nan_canonicalization = true; - } - pub fn canonicalize_nans(&mut self, enable: bool) -> &mut Self { self.enable_nan_canonicalization = enable; self diff --git a/lib/compiler/src/compiler.rs b/lib/compiler/src/compiler.rs index dcb5386b08e..fd8cf71d23f 100644 --- a/lib/compiler/src/compiler.rs +++ b/lib/compiler/src/compiler.rs @@ -37,16 +37,6 @@ pub trait CompilerConfig { // in case they create an IR that they can verify. } - /// Enable NaN canonicalization. - /// - /// NaN canonicalization is useful when trying to run WebAssembly - /// deterministically across different architectures. - #[deprecated(note = "Please use the canonicalize_nans instead")] - fn enable_nan_canonicalization(&mut self) { - // By default we do nothing, each backend will need to customize this - // in case they create an IR that they can verify. - } - /// Enable NaN canonicalization. /// /// NaN canonicalization is useful when trying to run WebAssembly diff --git a/lib/vm/src/instance/mod.rs b/lib/vm/src/instance/mod.rs index 3512056593a..34d4b429417 100644 --- a/lib/vm/src/instance/mod.rs +++ b/lib/vm/src/instance/mod.rs @@ -1533,10 +1533,3 @@ fn build_funcrefs( imported_func_refs.into_boxed_slice(), ) } - -/// This type is deprecated, it has been replaced by VMinstance. -#[deprecated( - since = "3.2.0", - note = "InstanceHandle has been replaced by VMInstance" -)] -pub type InstanceHandle = VMInstance; diff --git a/lib/vm/src/lib.rs b/lib/vm/src/lib.rs index 9853c551537..3d32b497917 100644 --- a/lib/vm/src/lib.rs +++ b/lib/vm/src/lib.rs @@ -45,8 +45,7 @@ pub use crate::extern_ref::{VMExternObj, VMExternRef}; pub use crate::function_env::VMFunctionEnvironment; pub use crate::global::*; pub use crate::imports::Imports; -#[allow(deprecated)] -pub use crate::instance::{InstanceAllocator, InstanceHandle, VMInstance}; +pub use crate::instance::{InstanceAllocator, VMInstance}; pub use crate::memory::{ initialize_memory_with_data, LinearMemory, NotifyLocation, VMMemory, VMOwnedMemory, VMSharedMemory, @@ -72,12 +71,6 @@ use wasmer_types::RawValue; pub use wasmer_types::TableStyle; pub use wasmer_types::{StoreId, TargetSharedSignatureIndex, VMBuiltinFunctionIndex, VMOffsets}; -#[deprecated( - since = "2.1.0", - note = "ModuleInfo, ExportsIterator, ImportsIterator should be imported from wasmer_types." -)] -pub use wasmer_types::{ExportsIterator, ImportsIterator, ModuleInfo}; - /// Version number of this crate. pub const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/lib/wasi/src/lib.rs b/lib/wasi/src/lib.rs index 44ee1cf7e50..12227a40a8c 100644 --- a/lib/wasi/src/lib.rs +++ b/lib/wasi/src/lib.rs @@ -68,10 +68,6 @@ use wasmer::{ }; pub use virtual_fs; -#[deprecated(since = "2.1.0", note = "Please use `virtual_fs::FsError`")] -pub use virtual_fs::FsError as WasiFsError; -#[deprecated(since = "2.1.0", note = "Please use `virtual_fs::VirtualFile`")] -pub use virtual_fs::VirtualFile as WasiFile; pub use virtual_fs::{DuplexPipe, FsError, Pipe, VirtualFile, WasiBidirectionalSharedPipePair}; pub use virtual_net; pub use virtual_net::{UnsupportedVirtualNetworking, VirtualNetworking}; From 84791bdbc3bff13f7d4efc6b0c22a3168591e967 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 25 May 2023 11:59:34 +0200 Subject: [PATCH 2/4] Fixed linting --- lib/c-api/src/wasm_c_api/wasi/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/c-api/src/wasm_c_api/wasi/mod.rs b/lib/c-api/src/wasm_c_api/wasi/mod.rs index 360ba0ebda8..dac0adedde5 100644 --- a/lib/c-api/src/wasm_c_api/wasi/mod.rs +++ b/lib/c-api/src/wasm_c_api/wasi/mod.rs @@ -19,8 +19,8 @@ use std::slice; #[cfg(feature = "webc_runner")] use wasmer_api::{AsStoreMut, Imports, Module}; use wasmer_wasix::{ - default_fs_backing, get_wasi_version, virtual_fs::AsyncReadExt, Pipe, VirtualTaskManager, - WasiEnv, WasiEnvBuilder, WasiFile, WasiFunctionEnv, WasiVersion, + default_fs_backing, get_wasi_version, virtual_fs::AsyncReadExt, virtual_fs::VirtualFile, Pipe, + VirtualTaskManager, WasiEnv, WasiEnvBuilder, WasiFunctionEnv, WasiVersion, }; #[derive(Debug)] @@ -400,7 +400,7 @@ pub unsafe extern "C" fn wasi_env_read_stderr( fn read_inner( tasks: &dyn VirtualTaskManager, - wasi_file: &mut Box, + wasi_file: &mut Box, inner_buffer: &mut [u8], ) -> isize { tasks.block_on(async { From a2593dd1c2503907928138203e4e2205bf431e16 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 25 May 2023 12:20:33 +0200 Subject: [PATCH 3/4] Removed more unused functions --- lib/api/src/engine.rs | 31 ++------------------------- lib/api/src/sys/externals/function.rs | 1 + lib/api/src/sys/externals/memory.rs | 1 + lib/api/src/sys/externals/table.rs | 1 + lib/api/src/sys/module.rs | 1 + lib/api/src/sys/typed_function.rs | 1 + 6 files changed, 7 insertions(+), 29 deletions(-) diff --git a/lib/api/src/engine.rs b/lib/api/src/engine.rs index e8b0d34e46b..594d3d6dabb 100644 --- a/lib/api/src/engine.rs +++ b/lib/api/src/engine.rs @@ -13,7 +13,7 @@ use std::sync::Arc; #[cfg(feature = "sys")] pub use wasmer_compiler::{Artifact, CompilerConfig, EngineInner, Features, Tunables}; #[cfg(feature = "sys")] -use wasmer_types::{DeserializeError, Target}; +use wasmer_types::DeserializeError; #[cfg(feature = "js")] use crate::js::engine as engine_imp; @@ -35,20 +35,6 @@ impl Engine { self.0.deterministic_id() } - #[cfg(feature = "sys")] - /// Create a headless `Engine` - /// Will be removed in 4.0 in favor of the NativeEngineExt trait - pub fn headless() -> Self { - Self(engine_imp::Engine::headless()) - } - - #[cfg(feature = "sys")] - /// Gets the target - /// Will be removed in 4.0 in favor of the NativeEngineExt trait - pub fn target(&self) -> &Target { - self.0.target() - } - #[cfg(all(feature = "sys", not(target_arch = "wasm32")))] /// Deserializes a WebAssembly module which was previously serialized with /// `Module::serialize`. @@ -110,21 +96,8 @@ impl Engine { file.read_to_end(&mut buffer)?; Ok(Arc::new(Artifact::deserialize(&self.0, buffer.as_slice())?)) } - - #[cfg(all(feature = "sys", not(target_arch = "wasm32")))] - /// Attach a Tunable to this engine - /// Will be removed in 4.0 in favor of the NativeEngineExt trait - pub fn set_tunables(&mut self, tunables: impl Tunables + Send + Sync + 'static) { - self.0.set_tunables(tunables); - } - - #[cfg(all(feature = "sys", not(target_arch = "wasm32")))] - /// Get a reference to attached Tunable of this engine - /// Will be removed in 4.0 in favor of the NativeEngineExt trait - pub fn tunables(&self) -> &dyn Tunables { - self.0.tunables() - } } + impl AsEngineRef for Engine { #[inline] fn as_engine_ref(&self) -> EngineRef { diff --git a/lib/api/src/sys/externals/function.rs b/lib/api/src/sys/externals/function.rs index 5124893af1f..1ce6fe64007 100644 --- a/lib/api/src/sys/externals/function.rs +++ b/lib/api/src/sys/externals/function.rs @@ -1,6 +1,7 @@ use crate::externals::function::{HostFunction, WithEnv, WithoutEnv}; use crate::native_type::{FromToNativeWasmType, IntoResult, NativeWasmTypeInto, WasmTypeList}; use crate::store::{AsStoreMut, AsStoreRef, StoreInner, StoreMut}; +use crate::sys::engine::NativeEngineExt; use crate::vm::{VMExternFunction, VMFunctionCallback}; use crate::{FunctionEnv, FunctionEnvMut, FunctionType, RuntimeError, Value}; use std::panic::{self, AssertUnwindSafe}; diff --git a/lib/api/src/sys/externals/memory.rs b/lib/api/src/sys/externals/memory.rs index 8890e571c8b..90c02ac3051 100644 --- a/lib/api/src/sys/externals/memory.rs +++ b/lib/api/src/sys/externals/memory.rs @@ -1,5 +1,6 @@ use super::memory_view::MemoryView; use crate::store::{AsStoreMut, AsStoreRef}; +use crate::sys::engine::NativeEngineExt; use crate::vm::VMExternMemory; use crate::MemoryAccessError; use crate::MemoryType; diff --git a/lib/api/src/sys/externals/table.rs b/lib/api/src/sys/externals/table.rs index 6aea055be7b..f55afdd4c83 100644 --- a/lib/api/src/sys/externals/table.rs +++ b/lib/api/src/sys/externals/table.rs @@ -1,4 +1,5 @@ use crate::store::{AsStoreMut, AsStoreRef}; +use crate::sys::engine::NativeEngineExt; use crate::TableType; use crate::Value; use crate::{vm::VMExternTable, ExternRef, Function, RuntimeError}; diff --git a/lib/api/src/sys/module.rs b/lib/api/src/sys/module.rs index 5ea0c83f6d2..cbb550f26e8 100644 --- a/lib/api/src/sys/module.rs +++ b/lib/api/src/sys/module.rs @@ -9,6 +9,7 @@ use wasmer_types::{ }; use wasmer_types::{ExportType, ImportType}; +use crate::sys::engine::NativeEngineExt; use crate::vm::VMInstance; use crate::{AsStoreMut, AsStoreRef, InstantiationError, IntoBytes}; diff --git a/lib/api/src/sys/typed_function.rs b/lib/api/src/sys/typed_function.rs index 22508e223f9..1ff5d252bd8 100644 --- a/lib/api/src/sys/typed_function.rs +++ b/lib/api/src/sys/typed_function.rs @@ -3,6 +3,7 @@ use wasmer_types::RawValue; use crate::native_type::NativeWasmTypeInto; use crate::store::{AsStoreMut, AsStoreRef}; +use crate::sys::engine::NativeEngineExt; macro_rules! impl_native_traits { ( $( $x:ident ),* ) => { From fcd4d90b6e301b633648482e203de2b9bb9cd9b7 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 25 May 2023 12:23:51 +0200 Subject: [PATCH 4/4] Fixed ModuleInfo --- lib/vm/src/vmcontext.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vm/src/vmcontext.rs b/lib/vm/src/vmcontext.rs index 9e3fa240114..dcb5b0cd699 100644 --- a/lib/vm/src/vmcontext.rs +++ b/lib/vm/src/vmcontext.rs @@ -781,10 +781,10 @@ unsafe impl Sync for VMMemoryDefinition {} #[cfg(test)] mod test_vmmemory_definition { use super::VMMemoryDefinition; - use crate::ModuleInfo; use crate::VMOffsets; use memoffset::offset_of; use std::mem::size_of; + use wasmer_types::ModuleInfo; #[test] fn check_vmmemory_definition_offsets() {