From f11b92d9a9f72c9165ce80689980a3c5cada7f11 Mon Sep 17 00:00:00 2001 From: Elvand-Lie Date: Sun, 29 Nov 2026 01:23:12 +0700 Subject: [PATCH] docs: document WASI directory paths containing colons Describe the double-colon mapping for Windows drive paths and the relative-path workaround for earlier WasmEdge releases. Assisted-by: Codex (OpenAI) Assisted-by: Gemini 4 Neon (Google) Signed-off-by: Elvand-Lie --- docs/start/build-and-run/cli.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/start/build-and-run/cli.md b/docs/start/build-and-run/cli.md index 1cd92b542..165a2e168 100644 --- a/docs/start/build-and-run/cli.md +++ b/docs/start/build-and-run/cli.md @@ -64,7 +64,9 @@ The options of the `wasmedge` CLI tool are as follows: - If an exported function names `_initialize`, the function will be executed with the empty parameter at first. 4. _(Optional)_ `--dir`: Bind directories into WASI virtual filesystem. - Use `--dir guest_path:host_path` to bind the host path into the guest path in WASI virtual system. - - Use `--dir guest_path:host_path:readonly` to bind the host path in read-only mode. The default permission is `readwrite`. + - Use `--dir guest_path:host_path:readonly` for read-only access. Omit the suffix for read-write access. + - To include a literal `:` in either path, use `--dir guest_path::host_path` or `--dir guest_path::host_path::readonly` in builds that include [double-colon support](https://github.com/WasmEdge/WasmEdge/pull/5628). For example, in PowerShell, `wasmedge --dir 'data::C:\work\data' app.wasm` makes `C:\work\data` available as `data` to the guest. + - On WasmEdge 0.18.1 or earlier, change into the Windows host directory first and use `--dir data:.` to map it to `data`. 5. _(Optional)_ `--env`: Assign the environment variables in WASI. - Use `--env ENV_NAME=VALUE` to assign the environment variable. 6. _(Optional)_ `--module`: Register additional WASM modules for linking.