Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate deprecated usage #4427

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/cli/src/commands/create_exe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 2 additions & 0 deletions lib/cli/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions lib/middlewares/src/metering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions tests/compilers/config.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -50,15 +51,15 @@ impl Config {
}

pub fn engine(&self, compiler_config: Box<dyn CompilerConfig>) -> 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()));
}
engine.engine().into()
}

pub fn engine_headless(&self) -> wasmer::Engine {
wasmer::EngineBuilder::headless().engine().into()
wasmer::sys::EngineBuilder::headless().engine().into()
}

pub fn compiler_config(
Expand Down
2 changes: 1 addition & 1 deletion tests/compilers/wast.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use ::wasmer::Features;
use ::wasmer::sys::Features;
use std::path::Path;
use wasmer_wast::Wast;

Expand Down
Loading