Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vfs) Make host_fs the default, and exclusive to mem_fs #2523

Merged
merged 5 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 6 additions & 0 deletions lib/vfs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ 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(all(feature = "host_fs", feature = "mem_fs"))]
compile_error!("The `host_fs` and `mem_fs` features are mutually exclusive.");
Hywan marked this conversation as resolved.
Show resolved Hide resolved

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