Skip to content

Commit

Permalink
Merge pull request #2523 from Hywan/fix-vfs-make-features-exclusive
Browse files Browse the repository at this point in the history
feat(vfs) Make `host_fs` the default
  • Loading branch information
Hywan authored Aug 17, 2021
2 parents b4a7c35 + 0172463 commit 2240fa9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/c-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ wasmer-engine-universal = { version = "2.0.0", path = "../engine-universal", opt
wasmer-engine-dylib = { version = "2.0.0", path = "../engine-dylib", optional = true }
wasmer-engine-staticlib = { version = "2.0.0", path = "../engine-staticlib", optional = true }
wasmer-middlewares = { version = "2.0.0", path = "../middlewares", optional = true }
wasmer-wasi = { version = "2.0.0", path = "../wasi", default-features = false, features = ["host_fs"], optional = true }
wasmer-wasi = { version = "2.0.0", path = "../wasi", optional = true }
wasmer-types = { version = "2.0.0", path = "../types" }
enumset = "1.0"
cfg-if = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ wasmer-engine-universal = { version = "2.0.0", path = "../engine-universal", opt
wasmer-engine-dylib = { version = "2.0.0", path = "../engine-dylib", optional = true }
wasmer-engine-staticlib = { version = "2.0.0", path = "../engine-staticlib", optional = true }
wasmer-vm = { version = "2.0.0", path = "../vm" }
wasmer-wasi = { version = "2.0.0", path = "../wasi", default-features = false, features = ["host_fs"], optional = true }
wasmer-wasi = { version = "2.0.0", path = "../wasi", optional = true }
wasmer-wasi-experimental-io-devices = { version = "2.0.0", path = "../wasi-experimental-io-devices", optional = true }
wasmer-wast = { version = "2.0.0", path = "../../tests/lib/wast", optional = true }
wasmer-cache = { version = "2.0.0", path = "../cache", optional = true }
Expand Down
1 change: 1 addition & 0 deletions lib/vfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ typetag = { version = "0.1", optional = true }
serde = { version = "1.0", default-features = false, features = ["derive"], optional = true }

[features]
default = ["host_fs"]
host_fs = ["libc"]
mem_fs = []
enable-serde = [
Expand Down
3 changes: 3 additions & 0 deletions lib/vfs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ use std::path::{Path, PathBuf};
use thiserror::Error;
use tracing::debug;

#[cfg(all(not(feature = "host_fs"), not(feature = "mem_fs")))]
compile_error!("At least the `host_fs` or the `mem_fs` feature must be enabled. Please, pick one.");

#[cfg(feature = "host_fs")]
pub mod host_fs;
#[cfg(feature = "mem_fs")]
Expand Down

0 comments on commit 2240fa9

Please sign in to comment.