mapdir option, added back in #451 (cc @MarkMcCaskey) is described as compatible with Wasmtime, but uses a single : as a separator instead of :: for left and right sides.
Also, it doesn't account for possible colons in paths themselves, making this option impossible to use with absolute paths on Windows.
echo "`wasmer -V` | `rustc -V` | `uname -m`"
> echo "$(wasmer -V) | $(rustc -V)"
wasmer 0.17.0 | rustc 1.43.1 (8d69840ab 2020-05-04)
With arbitrary temp.wasm try the following on a Windows machine:
$ wasmer run --mapdir=/tmp:C:\Users\rreverser\Desktop\wasi\tmp temp.wasm
Wasm program is ran with /tmp mapped to C:\Users\rreverser\Desktop\wasi\tmp on the host machine.
Getting an error in the console
Error: Directory mappings must consist of two paths separate by a colon. Found /tmp:C:\Users\rreverser\Desktop\wasi\tmp
Also, it doesn't account for possible colons in paths themselves, making this option impossible to use with absolute paths on Windows.
That's a great point, we should probably allow separation by two colons :: @MarkMcCaskey
Note 1: it could be possible to also split the by the first encountered colon, to solve the issue in Windows.
Note 2: we are working on a new version of Wasmer and there might be a bit of delay on the resolution of the issue until we make it public. But we will work to make it happen! :)
We just fixed this on the refactor. Will close the issue once it's merged upstream.
We merged the refactor back into master a few weeks ago. Now the issue should be fixed in master.
Closing the issue!
Great, thanks!