From 766eb17fcfdf4c113da39f82aeca2d201e4f10f3 Mon Sep 17 00:00:00 2001 From: "M.Amin Rayej" Date: Sun, 1 Sep 2024 09:42:30 +0330 Subject: [PATCH 1/2] add cwd to the manifest as command annotation --- lib/wasix/src/runners/wasi.rs | 4 +++ .../cli/tests/packages/list-cwd/main.c | 26 ++++++++++++++++++ .../cli/tests/packages/list-cwd/main.wasm | Bin 0 -> 60198 bytes .../cli/tests/packages/list-cwd/wasmer.toml | 14 ++++++++++ tests/integration/cli/tests/run.rs | 23 ++++++++++++++++ 5 files changed, 67 insertions(+) create mode 100644 tests/integration/cli/tests/packages/list-cwd/main.c create mode 100644 tests/integration/cli/tests/packages/list-cwd/main.wasm create mode 100644 tests/integration/cli/tests/packages/list-cwd/wasmer.toml diff --git a/lib/wasix/src/runners/wasi.rs b/lib/wasix/src/runners/wasi.rs index 9bec6ca7a60..00f8ab58e2d 100644 --- a/lib/wasix/src/runners/wasi.rs +++ b/lib/wasix/src/runners/wasi.rs @@ -353,6 +353,10 @@ impl crate::runners::Runner for WasiRunner { } } + if let Some(cwd) = cmd.metadata().annotation::("cwd")? { + env.set_current_dir(PathBuf::from(cwd)); + } + let env = env.build()?; let store = runtime.new_store(); diff --git a/tests/integration/cli/tests/packages/list-cwd/main.c b/tests/integration/cli/tests/packages/list-cwd/main.c new file mode 100644 index 00000000000..fcfbdb4f9ab --- /dev/null +++ b/tests/integration/cli/tests/packages/list-cwd/main.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include + +int main(int argc, char *argv[]) +{ + DIR *dir; + struct dirent *entry; + + dir = opendir("./"); + if (dir == NULL) + { + perror("opendir"); + return 1; + } + + while ((entry = readdir(dir)) != NULL) + { + printf("%s\n", entry->d_name); + } + + closedir(dir); + + return 0; +} diff --git a/tests/integration/cli/tests/packages/list-cwd/main.wasm b/tests/integration/cli/tests/packages/list-cwd/main.wasm new file mode 100644 index 0000000000000000000000000000000000000000..9ae1b7c3b55cd0ae74cb9de13649f643c90b682c GIT bin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lWC}=B2b_t&?Ba0?|BU?vGhVOIPp?M = Lazy::new(|| { .join(",") }); +#[test] +fn list_cwd() { + let package = packages().join("list-cwd"); + + let output = Command::new(get_wasmer_path()) + .arg("run") + .arg(package) + .output() + .unwrap(); + + let stdout = output.stdout; + + let expected = ". +.. +main.c +main.wasm +wasmer.toml +" + .to_owned(); + + assert_eq!(expected, String::from_utf8(stdout).unwrap()); +} + #[test] fn nested_mounted_paths() { let package = packages().join("nested-mounted-paths"); From 3fbffbb33178834338d26e180dfed578a340499f Mon Sep 17 00:00:00 2001 From: "M.Amin Rayej" Date: Wed, 4 Sep 2024 13:13:06 +0330 Subject: [PATCH 2/2] use wasi annotation for cwd --- Cargo.lock | 28 +++++-------------- Cargo.toml | 2 +- lib/wasix/src/runners/wasi.rs | 4 +-- .../cli/tests/packages/list-cwd/wasmer.toml | 2 +- 4 files changed, 11 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b2bb7020c8e..bef0cd85877 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5558,18 +5558,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", -] - [[package]] name = "toml" version = "0.8.15" @@ -5598,8 +5586,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.2.6", - "serde", - "serde_spanned", "toml_datetime", "winnow 0.5.40", ] @@ -6827,9 +6813,9 @@ dependencies = [ [[package]] name = "wasmer-config" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a0f70c177b1c5062cfe0f5308c3317751796fef9403c22a0cd7b4cacd4ccd8" +checksum = "4b4a632496950fde9ad821e195ef1a301440076f7c7d80de55239a140359bcbd" dependencies = [ "anyhow", "bytesize", @@ -7425,12 +7411,12 @@ dependencies = [ [[package]] name = "webc" -version = "6.0.0-rc1" +version = "6.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fc686c7b43c9bc630a499f6ae1f0a4c4bd656576a53ae8a147b0cc9bc983ad" +checksum = "b85ffb11d1fabf0ebfc458a3d1d34ccf6d4d9596ca7576370cae4eab554c63d1" dependencies = [ "anyhow", - "base64 0.21.7", + "base64 0.22.1", "bytes 1.6.1", "cfg-if 1.0.0", "document-features", @@ -7452,9 +7438,9 @@ dependencies = [ "tar", "tempfile", "thiserror", - "toml 0.7.8", + "toml 0.8.15", "url", - "wasmer-config 0.2.0", + "wasmer-config 0.4.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index ae9309443c6..b0699951d0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,7 +92,7 @@ wasmer-config = { path = "./lib/config" } wasmer-wasix = { path = "./lib/wasix" } # Wasmer-owned crates -webc = { version = "6.0.0-rc1", default-features = false, features = ["package"] } +webc = { version = "6.0.0-rc3", default-features = false, features = ["package"] } edge-schema = { version = "=0.1.0" } shared-buffer = "0.1.4" diff --git a/lib/wasix/src/runners/wasi.rs b/lib/wasix/src/runners/wasi.rs index 00f8ab58e2d..60e51e974d3 100644 --- a/lib/wasix/src/runners/wasi.rs +++ b/lib/wasix/src/runners/wasi.rs @@ -353,8 +353,8 @@ impl crate::runners::Runner for WasiRunner { } } - if let Some(cwd) = cmd.metadata().annotation::("cwd")? { - env.set_current_dir(PathBuf::from(cwd)); + if let Some(cwd) = &wasi.cwd { + env.set_current_dir(cwd); } let env = env.build()?; diff --git a/tests/integration/cli/tests/packages/list-cwd/wasmer.toml b/tests/integration/cli/tests/packages/list-cwd/wasmer.toml index a9b06a2a681..3f6d3798b92 100644 --- a/tests/integration/cli/tests/packages/list-cwd/wasmer.toml +++ b/tests/integration/cli/tests/packages/list-cwd/wasmer.toml @@ -10,5 +10,5 @@ name = "run" module = "main" runner = "wasi" -[command.annotations] +[command.annotations.wasi] cwd = "/data" \ No newline at end of file