diff --git a/lib/c-api/Cargo.toml b/lib/c-api/Cargo.toml index 9b9fca8ff61..5335789a708 100644 --- a/lib/c-api/Cargo.toml +++ b/lib/c-api/Cargo.toml @@ -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" diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index 98f248b48e7..887623da1b7 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -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 } diff --git a/lib/vfs/Cargo.toml b/lib/vfs/Cargo.toml index 7a3dd8e6df4..02e1e43b6f7 100644 --- a/lib/vfs/Cargo.toml +++ b/lib/vfs/Cargo.toml @@ -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 = [ diff --git a/lib/vfs/src/lib.rs b/lib/vfs/src/lib.rs index 2ec54d5fefc..790f03781b3 100644 --- a/lib/vfs/src/lib.rs +++ b/lib/vfs/src/lib.rs @@ -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")]