diff --git a/lib/cli/src/commands/create_exe.rs b/lib/cli/src/commands/create_exe.rs index b6714d49723..95022fff656 100644 --- a/lib/cli/src/commands/create_exe.rs +++ b/lib/cli/src/commands/create_exe.rs @@ -11,6 +11,7 @@ use anyhow::{anyhow, bail, Context, Result}; use clap::Parser; use serde::{Deserialize, Serialize}; use tar::Archive; +use wasmer::sys::Artifact; use wasmer::*; use wasmer_object::{emit_serialized, get_object_for_target}; use wasmer_types::{compilation::symbols::ModuleMetadataSymbolRegistry, ModuleInfo}; diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index 34d61d0f429..29cb24e9182 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -11,6 +11,8 @@ use std::string::ToString; use std::sync::Arc; use anyhow::{bail, Result}; +#[cfg(feature = "sys")] +use wasmer::sys::Features; use wasmer::*; #[cfg(feature = "compiler")] use wasmer_compiler::CompilerConfig; diff --git a/lib/middlewares/src/metering.rs b/lib/middlewares/src/metering.rs index 3b32d83b5fd..acc30fed054 100644 --- a/lib/middlewares/src/metering.rs +++ b/lib/middlewares/src/metering.rs @@ -353,9 +353,8 @@ mod tests { use super::*; use std::sync::Arc; - use wasmer::{ - imports, wat2wasm, CompilerConfig, Cranelift, EngineBuilder, Module, Store, TypedFunction, - }; + use wasmer::sys::EngineBuilder; + use wasmer::{imports, wat2wasm, CompilerConfig, Cranelift, Module, Store, TypedFunction}; fn cost_function(operator: &Operator) -> u64 { match operator { diff --git a/tests/compilers/config.rs b/tests/compilers/config.rs index 82e0dabc258..96739558762 100644 --- a/tests/compilers/config.rs +++ b/tests/compilers/config.rs @@ -1,5 +1,6 @@ use std::sync::Arc; -use wasmer::{CompilerConfig, Features, ModuleMiddleware, Store}; +use wasmer::sys::Features; +use wasmer::{CompilerConfig, ModuleMiddleware, Store}; #[derive(Clone, Debug, PartialEq, Eq)] pub enum Compiler { @@ -50,7 +51,7 @@ impl Config { } pub fn engine(&self, compiler_config: Box) -> wasmer::Engine { - let mut engine = wasmer::EngineBuilder::new(compiler_config); + let mut engine = wasmer::sys::EngineBuilder::new(compiler_config); if let Some(ref features) = self.features { engine = engine.set_features(Some(features.clone())); } @@ -58,7 +59,7 @@ impl Config { } pub fn engine_headless(&self) -> wasmer::Engine { - wasmer::EngineBuilder::headless().engine().into() + wasmer::sys::EngineBuilder::headless().engine().into() } pub fn compiler_config( diff --git a/tests/compilers/wast.rs b/tests/compilers/wast.rs index 3c84fa26e0c..f79ceac5646 100644 --- a/tests/compilers/wast.rs +++ b/tests/compilers/wast.rs @@ -1,4 +1,4 @@ -use ::wasmer::Features; +use ::wasmer::sys::Features; use std::path::Path; use wasmer_wast::Wast;