mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-20 20:26:32 +00:00
remove colons from feature names
This commit is contained in:
@ -73,8 +73,8 @@ trace = ["wasmer-runtime-core/trace"]
|
|||||||
extra-debug = ["wasmer-clif-backend/debug", "wasmer-runtime-core/debug"]
|
extra-debug = ["wasmer-clif-backend/debug", "wasmer-runtime-core/debug"]
|
||||||
# This feature will allow cargo test to run much faster
|
# This feature will allow cargo test to run much faster
|
||||||
fast-tests = []
|
fast-tests = []
|
||||||
"backend:llvm" = ["wasmer-llvm-backend", "wasmer-runtime-core/backend:llvm"]
|
"backend-llvm" = ["wasmer-llvm-backend", "wasmer-runtime-core/backend-llvm"]
|
||||||
"backend:singlepass" = ["wasmer-singlepass-backend", "wasmer-runtime-core/backend:singlepass"]
|
"backend-singlepass" = ["wasmer-singlepass-backend", "wasmer-runtime-core/backend-singlepass"]
|
||||||
wasi = ["wasmer-wasi"]
|
wasi = ["wasmer-wasi"]
|
||||||
# vfs = ["wasmer-runtime-abi"]
|
# vfs = ["wasmer-runtime-abi"]
|
||||||
|
|
||||||
|
8
Makefile
8
Makefile
@ -112,13 +112,13 @@ lint:
|
|||||||
precommit: lint test
|
precommit: lint test
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
cargo build --release --features backend:singlepass,debug,trace
|
cargo build --release --features backend-singlepass,debug,trace
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cargo install --path .
|
cargo install --path .
|
||||||
|
|
||||||
release:
|
release:
|
||||||
cargo build --release --features backend:singlepass,backend:llvm,loader:kernel
|
cargo build --release --features backend-singlepass,backend-llvm,loader:kernel
|
||||||
|
|
||||||
# Only one backend (cranelift)
|
# Only one backend (cranelift)
|
||||||
release-fast:
|
release-fast:
|
||||||
@ -127,10 +127,10 @@ release-fast:
|
|||||||
cargo build --release
|
cargo build --release
|
||||||
|
|
||||||
release-singlepass:
|
release-singlepass:
|
||||||
cargo build --release --features backend:singlepass
|
cargo build --release --features backend-singlepass
|
||||||
|
|
||||||
release-llvm:
|
release-llvm:
|
||||||
cargo build --release --features backend:llvm
|
cargo build --release --features backend-llvm
|
||||||
|
|
||||||
bench:
|
bench:
|
||||||
cargo bench --all
|
cargo bench --all
|
||||||
|
@ -55,5 +55,5 @@ cc = "1.0"
|
|||||||
debug = []
|
debug = []
|
||||||
trace = ["debug"]
|
trace = ["debug"]
|
||||||
# backend flags used in conditional compilation of Backend::variants
|
# backend flags used in conditional compilation of Backend::variants
|
||||||
"backend:singlepass" = []
|
"backend-singlepass" = []
|
||||||
"backend:llvm" = []
|
"backend-llvm" = []
|
||||||
|
@ -33,9 +33,9 @@ impl Backend {
|
|||||||
pub fn variants() -> &'static [&'static str] {
|
pub fn variants() -> &'static [&'static str] {
|
||||||
&[
|
&[
|
||||||
"cranelift",
|
"cranelift",
|
||||||
#[cfg(feature = "backend:singlepass")]
|
#[cfg(feature = "backend-singlepass")]
|
||||||
"singlepass",
|
"singlepass",
|
||||||
#[cfg(feature = "backend:llvm")]
|
#[cfg(feature = "backend-llvm")]
|
||||||
"llvm",
|
"llvm",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ use structopt::StructOpt;
|
|||||||
|
|
||||||
use wasmer::*;
|
use wasmer::*;
|
||||||
use wasmer_clif_backend::CraneliftCompiler;
|
use wasmer_clif_backend::CraneliftCompiler;
|
||||||
#[cfg(feature = "backend:llvm")]
|
#[cfg(feature = "backend-llvm")]
|
||||||
use wasmer_llvm_backend::LLVMCompiler;
|
use wasmer_llvm_backend::LLVMCompiler;
|
||||||
use wasmer_runtime::{
|
use wasmer_runtime::{
|
||||||
cache::{Cache as BaseCache, FileSystemCache, WasmHash, WASMER_VERSION_HASH},
|
cache::{Cache as BaseCache, FileSystemCache, WasmHash, WASMER_VERSION_HASH},
|
||||||
@ -27,7 +27,7 @@ use wasmer_runtime_core::{
|
|||||||
debug,
|
debug,
|
||||||
loader::{Instance as LoadedInstance, LocalLoader},
|
loader::{Instance as LoadedInstance, LocalLoader},
|
||||||
};
|
};
|
||||||
#[cfg(feature = "backend:singlepass")]
|
#[cfg(feature = "backend-singlepass")]
|
||||||
use wasmer_singlepass_backend::SinglePassCompiler;
|
use wasmer_singlepass_backend::SinglePassCompiler;
|
||||||
#[cfg(feature = "wasi")]
|
#[cfg(feature = "wasi")]
|
||||||
use wasmer_wasi;
|
use wasmer_wasi;
|
||||||
@ -112,7 +112,7 @@ struct Run {
|
|||||||
)]
|
)]
|
||||||
loader: Option<LoaderName>,
|
loader: Option<LoaderName>,
|
||||||
|
|
||||||
#[cfg(feature = "backend:singlepass")]
|
#[cfg(feature = "backend-singlepass")]
|
||||||
#[structopt(long = "resume")]
|
#[structopt(long = "resume")]
|
||||||
resume: Option<String>,
|
resume: Option<String>,
|
||||||
|
|
||||||
@ -315,14 +315,14 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let compiler: Box<dyn Compiler> = match options.backend {
|
let compiler: Box<dyn Compiler> = match options.backend {
|
||||||
#[cfg(feature = "backend:singlepass")]
|
#[cfg(feature = "backend-singlepass")]
|
||||||
Backend::Singlepass => Box::new(SinglePassCompiler::new()),
|
Backend::Singlepass => Box::new(SinglePassCompiler::new()),
|
||||||
#[cfg(not(feature = "backend:singlepass"))]
|
#[cfg(not(feature = "backend-singlepass"))]
|
||||||
Backend::Singlepass => return Err("The singlepass backend is not enabled".to_string()),
|
Backend::Singlepass => return Err("The singlepass backend is not enabled".to_string()),
|
||||||
Backend::Cranelift => Box::new(CraneliftCompiler::new()),
|
Backend::Cranelift => Box::new(CraneliftCompiler::new()),
|
||||||
#[cfg(feature = "backend:llvm")]
|
#[cfg(feature = "backend-llvm")]
|
||||||
Backend::LLVM => Box::new(LLVMCompiler::new()),
|
Backend::LLVM => Box::new(LLVMCompiler::new()),
|
||||||
#[cfg(not(feature = "backend:llvm"))]
|
#[cfg(not(feature = "backend-llvm"))]
|
||||||
Backend::LLVM => return Err("the llvm backend is not enabled".to_string()),
|
Backend::LLVM => return Err("the llvm backend is not enabled".to_string()),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -501,7 +501,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
|||||||
|
|
||||||
let start: Func<(), ()> = instance.func("_start").map_err(|e| format!("{:?}", e))?;
|
let start: Func<(), ()> = instance.func("_start").map_err(|e| format!("{:?}", e))?;
|
||||||
|
|
||||||
#[cfg(feature = "backend:singlepass")]
|
#[cfg(feature = "backend-singlepass")]
|
||||||
unsafe {
|
unsafe {
|
||||||
if options.backend == Backend::Singlepass {
|
if options.backend == Backend::Singlepass {
|
||||||
use wasmer_runtime_core::fault::{catch_unsafe_unwind, ensure_sighandler};
|
use wasmer_runtime_core::fault::{catch_unsafe_unwind, ensure_sighandler};
|
||||||
@ -608,18 +608,18 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "backend:singlepass")]
|
#[cfg(feature = "backend-singlepass")]
|
||||||
struct InteractiveShellContext {
|
struct InteractiveShellContext {
|
||||||
image: Option<wasmer_runtime_core::state::InstanceImage>,
|
image: Option<wasmer_runtime_core::state::InstanceImage>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "backend:singlepass")]
|
#[cfg(feature = "backend-singlepass")]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
enum ShellExitOperation {
|
enum ShellExitOperation {
|
||||||
ContinueWith(wasmer_runtime_core::state::InstanceImage),
|
ContinueWith(wasmer_runtime_core::state::InstanceImage),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "backend:singlepass")]
|
#[cfg(feature = "backend-singlepass")]
|
||||||
fn interactive_shell(mut ctx: InteractiveShellContext) -> ShellExitOperation {
|
fn interactive_shell(mut ctx: InteractiveShellContext) -> ShellExitOperation {
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user