Skip to content

Commit

Permalink
Merge #3030
Browse files Browse the repository at this point in the history
3030: Remove cranelift dependency from wasmer-wasi r=epilys a=epilys

<!-- 
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests

-->

# Description
<!-- 
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->

# Review

- [ ] Add a short description of the change to the CHANGELOG.md file


Co-authored-by: Manos Pitsidianakis <[email protected]>
  • Loading branch information
bors[bot] and epilys authored Jul 21, 2022
2 parents e75e76d + 73200b9 commit e2ede64
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ glob = "0.3"
rustc_version = "0.4"

[dev-dependencies]
wasmer = { version = "=2.3.0", path = "lib/api", default-features = false, features = ["default-cranelift"] }
anyhow = "1.0"
criterion = "0.3"
lazy_static = "1.4"
Expand Down
2 changes: 1 addition & 1 deletion lib/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ core = ["hashbrown"]

# Features for `sys`.
sys = []
sys-default = ["sys", "wat", "default-cranelift", "default-universal"]
sys-default = ["sys", "wat", "default-universal"]
# - Compilers.
compiler = [
"sys",
Expand Down
2 changes: 1 addition & 1 deletion lib/api/src/sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub use wasmer_compiler_cranelift::{Cranelift, CraneliftOptLevel};
#[cfg(feature = "llvm")]
pub use wasmer_compiler_llvm::{LLVMOptLevel, LLVM};

#[cfg(feature = "universal")]
#[cfg(all(feature = "universal", feature = "compiler"))]
pub use wasmer_compiler::{Universal, UniversalArtifact, UniversalEngine};

/// Version number of this crate.
Expand Down
6 changes: 5 additions & 1 deletion lib/api/src/sys/store.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
use crate::sys::tunables::BaseTunables;
use std::fmt;
use std::sync::Arc;
#[cfg(feature = "compiler")]
use wasmer_compiler::CompilerConfig;
use wasmer_compiler::{Engine, Tunables, Universal};
#[cfg(feature = "compiler")]
use wasmer_compiler::Universal;
use wasmer_compiler::{Engine, Tunables};
use wasmer_vm::{init_traps, TrapHandlerFn};

use wasmer_vm::StoreObjects;
Expand Down Expand Up @@ -32,6 +35,7 @@ pub struct Store {
}

impl Store {
#[cfg(feature = "compiler")]
/// Creates a new `Store` with a specific [`CompilerConfig`].
pub fn new(compiler_config: Box<dyn CompilerConfig>) -> Self {
let engine = Universal::new(compiler_config).engine();
Expand Down
2 changes: 1 addition & 1 deletion lib/wasi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ tracing-wasm = "0.2"
default = ["sys-default"]

sys = ["wasmer/sys"]
sys-default = ["wasmer/sys-default", "sys", "logging", "host-fs", "sys-poll", "host-vnet" ]
sys-default = ["wasmer/wat", "wasmer/default-universal", "sys", "logging", "host-fs", "sys-poll", "host-vnet" ]
sys-poll = []

js = ["wasmer/js", "mem-fs", "wasmer-vfs/no-time", "getrandom/js", "chrono"]
Expand Down

0 comments on commit e2ede64

Please sign in to comment.