From f233ca444e5c37f52063dbda082bc85a63cc0d48 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Thu, 4 Mar 2021 23:17:14 +0100 Subject: [PATCH] chore(api) The `compiler` feature enables `wasmer-compiler/translator`. --- Cargo.lock | 1 - lib/api/Cargo.toml | 1 + lib/c-api/Cargo.toml | 2 +- lib/c-api/src/wasm_c_api/engine.rs | 2 +- lib/c-api/src/wasm_c_api/unstable/middlewares/mod.rs | 2 +- lib/c-api/src/wasm_c_api/unstable/target_lexicon.rs | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2991a3435..fb4029c4e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2354,7 +2354,6 @@ dependencies = [ "thiserror", "typetag", "wasmer", - "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-compiler-llvm", "wasmer-compiler-singlepass", diff --git a/lib/api/Cargo.toml b/lib/api/Cargo.toml index 0972819e8..f9286c04c 100644 --- a/lib/api/Cargo.toml +++ b/lib/api/Cargo.toml @@ -44,6 +44,7 @@ maintenance = { status = "actively-developed" } [features] default = ["wat", "default-cranelift", "default-jit"] compiler = [ + "wasmer-compiler/translator", "wasmer-engine-jit/compiler", "wasmer-engine-native/compiler", ] diff --git a/lib/c-api/Cargo.toml b/lib/c-api/Cargo.toml index 49a3f2c2d..a6987d898 100644 --- a/lib/c-api/Cargo.toml +++ b/lib/c-api/Cargo.toml @@ -16,7 +16,6 @@ crate-type = ["cdylib", "rlib", "staticlib"] [dependencies] wasmer = { version = "1.0.2", path = "../api", default-features = false } -wasmer-compiler = { version = "1.0.2", path = "../compiler" } wasmer-compiler-cranelift = { version = "1.0.2", path = "../compiler-cranelift", optional = true } wasmer-compiler-singlepass = { version = "1.0.2", path = "../compiler-singlepass", optional = true } wasmer-compiler-llvm = { version = "1.0.2", path = "../compiler-llvm", optional = true } @@ -68,6 +67,7 @@ object-file = [ "engine", ] compiler = [ + "wasmer/compiler", "wasmer-engine-jit/compiler", "wasmer-engine-native/compiler", "wasmer-engine-object-file/compiler" diff --git a/lib/c-api/src/wasm_c_api/engine.rs b/lib/c-api/src/wasm_c_api/engine.rs index 0d9d1c362..e90143202 100644 --- a/lib/c-api/src/wasm_c_api/engine.rs +++ b/lib/c-api/src/wasm_c_api/engine.rs @@ -286,7 +286,7 @@ pub struct wasm_engine_t { // Compiler JIT #[cfg(feature = "compiler")] -use wasmer_compiler::CompilerConfig; +use wasmer::CompilerConfig; #[cfg(feature = "compiler")] fn get_default_compiler_config() -> Box { cfg_if! { diff --git a/lib/c-api/src/wasm_c_api/unstable/middlewares/mod.rs b/lib/c-api/src/wasm_c_api/unstable/middlewares/mod.rs index 1402ce74e..6a1c86daa 100644 --- a/lib/c-api/src/wasm_c_api/unstable/middlewares/mod.rs +++ b/lib/c-api/src/wasm_c_api/unstable/middlewares/mod.rs @@ -5,7 +5,7 @@ pub mod metering; use super::super::engine::wasm_config_t; use std::sync::Arc; -use wasmer_compiler::ModuleMiddleware; +use wasmer::ModuleMiddleware; #[cfg(all(feature = "middlewares", not(feature = "compiler")))] compile_error!("The `middlewares` feature requires the `compiler` feature to be turned on"); diff --git a/lib/c-api/src/wasm_c_api/unstable/target_lexicon.rs b/lib/c-api/src/wasm_c_api/unstable/target_lexicon.rs index bea0ec64e..cf16829f7 100644 --- a/lib/c-api/src/wasm_c_api/unstable/target_lexicon.rs +++ b/lib/c-api/src/wasm_c_api/unstable/target_lexicon.rs @@ -58,7 +58,7 @@ use crate::error::CApiError; use enumset::EnumSet; use std::slice; use std::str::{self, FromStr}; -use wasmer_compiler::{CpuFeature, Target, Triple}; +use wasmer::{CpuFeature, Target, Triple}; /// Unstable non-standard Wasmer-specific API to represent a triple + /// CPU features pair.