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",
|
"thiserror",
|
||||||
"typetag",
|
"typetag",
|
||||||
"wasmer",
|
"wasmer",
|
||||||
"wasmer-compiler",
|
|
||||||
"wasmer-compiler-cranelift",
|
"wasmer-compiler-cranelift",
|
||||||
"wasmer-compiler-llvm",
|
"wasmer-compiler-llvm",
|
||||||
"wasmer-compiler-singlepass",
|
"wasmer-compiler-singlepass",
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ maintenance = { status = "actively-developed" }
|
|||||||
[features]
|
[features]
|
||||||
default = ["wat", "default-cranelift", "default-jit"]
|
default = ["wat", "default-cranelift", "default-jit"]
|
||||||
compiler = [
|
compiler = [
|
||||||
|
"wasmer-compiler/translator",
|
||||||
"wasmer-engine-jit/compiler",
|
"wasmer-engine-jit/compiler",
|
||||||
"wasmer-engine-native/compiler",
|
"wasmer-engine-native/compiler",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ crate-type = ["cdylib", "rlib", "staticlib"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wasmer = { version = "1.0.2", path = "../api", default-features = false }
|
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-cranelift = { version = "1.0.2", path = "../compiler-cranelift", optional = true }
|
||||||
wasmer-compiler-singlepass = { version = "1.0.2", path = "../compiler-singlepass", 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 }
|
wasmer-compiler-llvm = { version = "1.0.2", path = "../compiler-llvm", optional = true }
|
||||||
@@ -68,6 +67,7 @@ object-file = [
|
|||||||
"engine",
|
"engine",
|
||||||
]
|
]
|
||||||
compiler = [
|
compiler = [
|
||||||
|
"wasmer/compiler",
|
||||||
"wasmer-engine-jit/compiler",
|
"wasmer-engine-jit/compiler",
|
||||||
"wasmer-engine-native/compiler",
|
"wasmer-engine-native/compiler",
|
||||||
"wasmer-engine-object-file/compiler"
|
"wasmer-engine-object-file/compiler"
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ pub struct wasm_engine_t {
|
|||||||
|
|
||||||
// Compiler JIT
|
// Compiler JIT
|
||||||
#[cfg(feature = "compiler")]
|
#[cfg(feature = "compiler")]
|
||||||
use wasmer_compiler::CompilerConfig;
|
use wasmer::CompilerConfig;
|
||||||
#[cfg(feature = "compiler")]
|
#[cfg(feature = "compiler")]
|
||||||
fn get_default_compiler_config() -> Box<dyn CompilerConfig> {
|
fn get_default_compiler_config() -> Box<dyn CompilerConfig> {
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ pub mod metering;
|
|||||||
|
|
||||||
use super::super::engine::wasm_config_t;
|
use super::super::engine::wasm_config_t;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use wasmer_compiler::ModuleMiddleware;
|
use wasmer::ModuleMiddleware;
|
||||||
|
|
||||||
#[cfg(all(feature = "middlewares", not(feature = "compiler")))]
|
#[cfg(all(feature = "middlewares", not(feature = "compiler")))]
|
||||||
compile_error!("The `middlewares` feature requires the `compiler` feature to be turned on");
|
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 enumset::EnumSet;
|
||||||
use std::slice;
|
use std::slice;
|
||||||
use std::str::{self, FromStr};
|
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 +
|
/// Unstable non-standard Wasmer-specific API to represent a triple +
|
||||||
/// CPU features pair.
|
/// CPU features pair.
|
||||||
|
|||||||
Reference in New Issue
Block a user