mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 21:58:20 +00:00
chore(api) The compiler feature enables wasmer-compiler/translator.
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -2354,7 +2354,6 @@ dependencies = [
|
||||
"thiserror",
|
||||
"typetag",
|
||||
"wasmer",
|
||||
"wasmer-compiler",
|
||||
"wasmer-compiler-cranelift",
|
||||
"wasmer-compiler-llvm",
|
||||
"wasmer-compiler-singlepass",
|
||||
|
||||
@@ -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",
|
||||
]
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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<dyn CompilerConfig> {
|
||||
cfg_if! {
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user