From 6863965e4e319fb1876755503d4296aa005956e8 Mon Sep 17 00:00:00 2001 From: Christoph Herzog Date: Mon, 15 May 2023 19:32:21 +0200 Subject: [PATCH] refactor: Align virtual-fs and virtual-net directories with crate names Partial solution for #3785 NOTE: this PR does not yet rename wasi to wasix, because some other larger feature work is pending that should be merged first to avoid conflicts. --- Cargo.toml | 4 ++-- Makefile | 2 +- lib/c-api/Cargo.toml | 2 +- lib/cli/Cargo.toml | 4 ++-- lib/{vfs => virtual-fs}/Cargo.toml | 0 lib/{vfs => virtual-fs}/src/arc_box_file.rs | 0 lib/{vfs => virtual-fs}/src/arc_file.rs | 0 lib/{vfs => virtual-fs}/src/arc_fs.rs | 0 lib/{vfs => virtual-fs}/src/builder.rs | 0 lib/{vfs => virtual-fs}/src/combine_file.rs | 0 lib/{vfs => virtual-fs}/src/dual_write_file.rs | 0 lib/{vfs => virtual-fs}/src/empty_fs.rs | 0 lib/{vfs => virtual-fs}/src/filesystems.rs | 0 lib/{vfs => virtual-fs}/src/host_fs.rs | 0 lib/{vfs => virtual-fs}/src/lib.rs | 0 lib/{vfs => virtual-fs}/src/mem_fs/file.rs | 0 lib/{vfs => virtual-fs}/src/mem_fs/file_opener.rs | 0 lib/{vfs => virtual-fs}/src/mem_fs/filesystem.rs | 0 lib/{vfs => virtual-fs}/src/mem_fs/mod.rs | 0 lib/{vfs => virtual-fs}/src/mem_fs/stdio.rs | 0 lib/{vfs => virtual-fs}/src/null_file.rs | 0 lib/{vfs => virtual-fs}/src/ops.rs | 0 lib/{vfs => virtual-fs}/src/overlay_fs.rs | 0 lib/{vfs => virtual-fs}/src/passthru_fs.rs | 0 lib/{vfs => virtual-fs}/src/pipe.rs | 0 lib/{vfs => virtual-fs}/src/random_file.rs | 0 lib/{vfs => virtual-fs}/src/special_file.rs | 0 lib/{vfs => virtual-fs}/src/static_fs.rs | 0 lib/{vfs => virtual-fs}/src/tmp_fs.rs | 0 lib/{vfs => virtual-fs}/src/trace_fs.rs | 0 lib/{vfs => virtual-fs}/src/union_fs.rs | 0 lib/{vfs => virtual-fs}/src/webc_fs.rs | 0 lib/{vfs => virtual-fs}/src/webc_volume_fs.rs | 0 lib/{vfs => virtual-fs}/src/zero_file.rs | 0 lib/{vnet => virtual-net}/Cargo.toml | 0 lib/{vnet => virtual-net}/src/host.rs | 0 lib/{vnet => virtual-net}/src/lib.rs | 0 lib/wasi/Cargo.toml | 4 ++-- tests/lib/wast/Cargo.toml | 2 +- 39 files changed, 9 insertions(+), 9 deletions(-) rename lib/{vfs => virtual-fs}/Cargo.toml (100%) rename lib/{vfs => virtual-fs}/src/arc_box_file.rs (100%) rename lib/{vfs => virtual-fs}/src/arc_file.rs (100%) rename lib/{vfs => virtual-fs}/src/arc_fs.rs (100%) rename lib/{vfs => virtual-fs}/src/builder.rs (100%) rename lib/{vfs => virtual-fs}/src/combine_file.rs (100%) rename lib/{vfs => virtual-fs}/src/dual_write_file.rs (100%) rename lib/{vfs => virtual-fs}/src/empty_fs.rs (100%) rename lib/{vfs => virtual-fs}/src/filesystems.rs (100%) rename lib/{vfs => virtual-fs}/src/host_fs.rs (100%) rename lib/{vfs => virtual-fs}/src/lib.rs (100%) rename lib/{vfs => virtual-fs}/src/mem_fs/file.rs (100%) rename lib/{vfs => virtual-fs}/src/mem_fs/file_opener.rs (100%) rename lib/{vfs => virtual-fs}/src/mem_fs/filesystem.rs (100%) rename lib/{vfs => virtual-fs}/src/mem_fs/mod.rs (100%) rename lib/{vfs => virtual-fs}/src/mem_fs/stdio.rs (100%) rename lib/{vfs => virtual-fs}/src/null_file.rs (100%) rename lib/{vfs => virtual-fs}/src/ops.rs (100%) rename lib/{vfs => virtual-fs}/src/overlay_fs.rs (100%) rename lib/{vfs => virtual-fs}/src/passthru_fs.rs (100%) rename lib/{vfs => virtual-fs}/src/pipe.rs (100%) rename lib/{vfs => virtual-fs}/src/random_file.rs (100%) rename lib/{vfs => virtual-fs}/src/special_file.rs (100%) rename lib/{vfs => virtual-fs}/src/static_fs.rs (100%) rename lib/{vfs => virtual-fs}/src/tmp_fs.rs (100%) rename lib/{vfs => virtual-fs}/src/trace_fs.rs (100%) rename lib/{vfs => virtual-fs}/src/union_fs.rs (100%) rename lib/{vfs => virtual-fs}/src/webc_fs.rs (100%) rename lib/{vfs => virtual-fs}/src/webc_volume_fs.rs (100%) rename lib/{vfs => virtual-fs}/src/zero_file.rs (100%) rename lib/{vnet => virtual-net}/Cargo.toml (100%) rename lib/{vnet => virtual-net}/src/host.rs (100%) rename lib/{vnet => virtual-net}/src/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 68964b92d0e..48e96079bf7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,8 +41,8 @@ members = [ "lib/derive", "lib/emscripten", "lib/object", - "lib/vfs", - "lib/vnet", + "lib/virtual-fs", + "lib/virtual-net", "lib/sys-utils", "lib/vm", "lib/wai-bindgen-wasmer", diff --git a/Makefile b/Makefile index 20463e71af4..f45af8d39a9 100644 --- a/Makefile +++ b/Makefile @@ -536,7 +536,7 @@ test-stage-2-test-compiler-cranelift-nostd: test-stage-3-test-compiler-singlepass-nostd: $(CARGO_BINARY) test $(CARGO_TARGET_FLAG) --manifest-path lib/compiler-singlepass/Cargo.toml --release --no-default-features --features=std test-stage-4-wasmer-cli: - $(CARGO_BINARY) test $(CARGO_TARGET_FLAG) --manifest-path lib/vfs/Cargo.toml --release + $(CARGO_BINARY) test $(CARGO_TARGET_FLAG) --manifest-path lib/virtual-fs/Cargo.toml --release $(CARGO_BINARY) test $(CARGO_TARGET_FLAG) --manifest-path lib/cli/Cargo.toml $(compiler_features) --release # test examples diff --git a/lib/c-api/Cargo.toml b/lib/c-api/Cargo.toml index 2cfee337c45..7aecabd3611 100644 --- a/lib/c-api/Cargo.toml +++ b/lib/c-api/Cargo.toml @@ -32,7 +32,7 @@ wasmer-middlewares = { version = "=3.3.0", path = "../middlewares", optional = t wasmer-types = { version = "=3.3.0", path = "../types" } wasmer-wasix = { version = "0.4.0", path = "../wasi", features = ["host-fs", "host-vnet"], optional = true } webc = { version = "5.0", optional = true } -virtual-fs = { version = "0.2.0", path = "../vfs", optional = true, default-features = false, features = ["static-fs"] } +virtual-fs = { version = "0.2.0", path = "../virtual-fs", optional = true, default-features = false, features = ["static-fs"] } enumset = "1.0.2" cfg-if = "1.0" lazy_static = "1.4" diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index 5a5b655f557..24a4246fd05 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -40,8 +40,8 @@ wasmer-cache = { version = "=3.3.0", path = "../cache", features = ["blake3-pure wasmer-types = { version = "=3.3.0", path = "../types", features = ["enable-serde"] } wasmer-registry = { version = "4.5.0", path = "../registry", features = ["build-package"] } wasmer-object = { version = "=3.3.0", path = "../object", optional = true } -virtual-fs = { version = "0.2.0", path = "../vfs", default-features = false, features = ["host-fs"] } -virtual-net = { version = "0.1.0", path = "../vnet" } +virtual-fs = { version = "0.2.0", path = "../virtual-fs", default-features = false, features = ["host-fs"] } +virtual-net = { version = "0.1.0", path = "../virtual-net" } # Wasmer-owned dependencies. webc = { version = "5.0" } diff --git a/lib/vfs/Cargo.toml b/lib/virtual-fs/Cargo.toml similarity index 100% rename from lib/vfs/Cargo.toml rename to lib/virtual-fs/Cargo.toml diff --git a/lib/vfs/src/arc_box_file.rs b/lib/virtual-fs/src/arc_box_file.rs similarity index 100% rename from lib/vfs/src/arc_box_file.rs rename to lib/virtual-fs/src/arc_box_file.rs diff --git a/lib/vfs/src/arc_file.rs b/lib/virtual-fs/src/arc_file.rs similarity index 100% rename from lib/vfs/src/arc_file.rs rename to lib/virtual-fs/src/arc_file.rs diff --git a/lib/vfs/src/arc_fs.rs b/lib/virtual-fs/src/arc_fs.rs similarity index 100% rename from lib/vfs/src/arc_fs.rs rename to lib/virtual-fs/src/arc_fs.rs diff --git a/lib/vfs/src/builder.rs b/lib/virtual-fs/src/builder.rs similarity index 100% rename from lib/vfs/src/builder.rs rename to lib/virtual-fs/src/builder.rs diff --git a/lib/vfs/src/combine_file.rs b/lib/virtual-fs/src/combine_file.rs similarity index 100% rename from lib/vfs/src/combine_file.rs rename to lib/virtual-fs/src/combine_file.rs diff --git a/lib/vfs/src/dual_write_file.rs b/lib/virtual-fs/src/dual_write_file.rs similarity index 100% rename from lib/vfs/src/dual_write_file.rs rename to lib/virtual-fs/src/dual_write_file.rs diff --git a/lib/vfs/src/empty_fs.rs b/lib/virtual-fs/src/empty_fs.rs similarity index 100% rename from lib/vfs/src/empty_fs.rs rename to lib/virtual-fs/src/empty_fs.rs diff --git a/lib/vfs/src/filesystems.rs b/lib/virtual-fs/src/filesystems.rs similarity index 100% rename from lib/vfs/src/filesystems.rs rename to lib/virtual-fs/src/filesystems.rs diff --git a/lib/vfs/src/host_fs.rs b/lib/virtual-fs/src/host_fs.rs similarity index 100% rename from lib/vfs/src/host_fs.rs rename to lib/virtual-fs/src/host_fs.rs diff --git a/lib/vfs/src/lib.rs b/lib/virtual-fs/src/lib.rs similarity index 100% rename from lib/vfs/src/lib.rs rename to lib/virtual-fs/src/lib.rs diff --git a/lib/vfs/src/mem_fs/file.rs b/lib/virtual-fs/src/mem_fs/file.rs similarity index 100% rename from lib/vfs/src/mem_fs/file.rs rename to lib/virtual-fs/src/mem_fs/file.rs diff --git a/lib/vfs/src/mem_fs/file_opener.rs b/lib/virtual-fs/src/mem_fs/file_opener.rs similarity index 100% rename from lib/vfs/src/mem_fs/file_opener.rs rename to lib/virtual-fs/src/mem_fs/file_opener.rs diff --git a/lib/vfs/src/mem_fs/filesystem.rs b/lib/virtual-fs/src/mem_fs/filesystem.rs similarity index 100% rename from lib/vfs/src/mem_fs/filesystem.rs rename to lib/virtual-fs/src/mem_fs/filesystem.rs diff --git a/lib/vfs/src/mem_fs/mod.rs b/lib/virtual-fs/src/mem_fs/mod.rs similarity index 100% rename from lib/vfs/src/mem_fs/mod.rs rename to lib/virtual-fs/src/mem_fs/mod.rs diff --git a/lib/vfs/src/mem_fs/stdio.rs b/lib/virtual-fs/src/mem_fs/stdio.rs similarity index 100% rename from lib/vfs/src/mem_fs/stdio.rs rename to lib/virtual-fs/src/mem_fs/stdio.rs diff --git a/lib/vfs/src/null_file.rs b/lib/virtual-fs/src/null_file.rs similarity index 100% rename from lib/vfs/src/null_file.rs rename to lib/virtual-fs/src/null_file.rs diff --git a/lib/vfs/src/ops.rs b/lib/virtual-fs/src/ops.rs similarity index 100% rename from lib/vfs/src/ops.rs rename to lib/virtual-fs/src/ops.rs diff --git a/lib/vfs/src/overlay_fs.rs b/lib/virtual-fs/src/overlay_fs.rs similarity index 100% rename from lib/vfs/src/overlay_fs.rs rename to lib/virtual-fs/src/overlay_fs.rs diff --git a/lib/vfs/src/passthru_fs.rs b/lib/virtual-fs/src/passthru_fs.rs similarity index 100% rename from lib/vfs/src/passthru_fs.rs rename to lib/virtual-fs/src/passthru_fs.rs diff --git a/lib/vfs/src/pipe.rs b/lib/virtual-fs/src/pipe.rs similarity index 100% rename from lib/vfs/src/pipe.rs rename to lib/virtual-fs/src/pipe.rs diff --git a/lib/vfs/src/random_file.rs b/lib/virtual-fs/src/random_file.rs similarity index 100% rename from lib/vfs/src/random_file.rs rename to lib/virtual-fs/src/random_file.rs diff --git a/lib/vfs/src/special_file.rs b/lib/virtual-fs/src/special_file.rs similarity index 100% rename from lib/vfs/src/special_file.rs rename to lib/virtual-fs/src/special_file.rs diff --git a/lib/vfs/src/static_fs.rs b/lib/virtual-fs/src/static_fs.rs similarity index 100% rename from lib/vfs/src/static_fs.rs rename to lib/virtual-fs/src/static_fs.rs diff --git a/lib/vfs/src/tmp_fs.rs b/lib/virtual-fs/src/tmp_fs.rs similarity index 100% rename from lib/vfs/src/tmp_fs.rs rename to lib/virtual-fs/src/tmp_fs.rs diff --git a/lib/vfs/src/trace_fs.rs b/lib/virtual-fs/src/trace_fs.rs similarity index 100% rename from lib/vfs/src/trace_fs.rs rename to lib/virtual-fs/src/trace_fs.rs diff --git a/lib/vfs/src/union_fs.rs b/lib/virtual-fs/src/union_fs.rs similarity index 100% rename from lib/vfs/src/union_fs.rs rename to lib/virtual-fs/src/union_fs.rs diff --git a/lib/vfs/src/webc_fs.rs b/lib/virtual-fs/src/webc_fs.rs similarity index 100% rename from lib/vfs/src/webc_fs.rs rename to lib/virtual-fs/src/webc_fs.rs diff --git a/lib/vfs/src/webc_volume_fs.rs b/lib/virtual-fs/src/webc_volume_fs.rs similarity index 100% rename from lib/vfs/src/webc_volume_fs.rs rename to lib/virtual-fs/src/webc_volume_fs.rs diff --git a/lib/vfs/src/zero_file.rs b/lib/virtual-fs/src/zero_file.rs similarity index 100% rename from lib/vfs/src/zero_file.rs rename to lib/virtual-fs/src/zero_file.rs diff --git a/lib/vnet/Cargo.toml b/lib/virtual-net/Cargo.toml similarity index 100% rename from lib/vnet/Cargo.toml rename to lib/virtual-net/Cargo.toml diff --git a/lib/vnet/src/host.rs b/lib/virtual-net/src/host.rs similarity index 100% rename from lib/vnet/src/host.rs rename to lib/virtual-net/src/host.rs diff --git a/lib/vnet/src/lib.rs b/lib/virtual-net/src/lib.rs similarity index 100% rename from lib/vnet/src/lib.rs rename to lib/virtual-net/src/lib.rs diff --git a/lib/wasi/Cargo.toml b/lib/wasi/Cargo.toml index 900f2ae64c0..00a01069dad 100644 --- a/lib/wasi/Cargo.toml +++ b/lib/wasi/Cargo.toml @@ -18,8 +18,8 @@ getrandom = "0.2" wasmer-wasix-types = { path = "../wasi-types", version = "0.4.0", features = [ "enable-serde" ] } wasmer-types = { path = "../types", version = "=3.3.0", default-features = false } wasmer = { path = "../api", version = "=3.3.0", default-features = false, features = ["wat", "js-serializable-module"] } -virtual-fs = { path = "../vfs", version = "0.2.0", default-features = false, features = ["webc-fs"] } -virtual-net = { path = "../vnet", version = "0.1.0", default-features = false } +virtual-fs = { path = "../virtual-fs", version = "0.2.0", default-features = false, features = ["webc-fs"] } +virtual-net = { path = "../virtual-net", version = "0.1.0", default-features = false } wasmer-emscripten = { path = "../emscripten", version = "=3.3.0", optional = true } typetag = { version = "0.1", optional = true } serde = { version = "1.0", default-features = false, features = ["derive"] } diff --git a/tests/lib/wast/Cargo.toml b/tests/lib/wast/Cargo.toml index d7681c3f73f..ae7767f245c 100644 --- a/tests/lib/wast/Cargo.toml +++ b/tests/lib/wast/Cargo.toml @@ -14,7 +14,7 @@ edition = "2018" anyhow = "1.0" wasmer = { path = "../../../lib/api", version = "=3.3.0", default-features = false } wasmer-wasix = { path = "../../../lib/wasi", version = "0.4.0" } -virtual-fs = { path = "../../../lib/vfs", version = "0.2.0" } +virtual-fs = { path = "../../../lib/virtual-fs", version = "0.2.0" } wast = "38.0" serde = "1" tempfile = "3.4.0"