-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
I'm trying to write a runner in .cargo/config.toml that passes a subdirectory to wasmtime. I'd like that path to be relative, so it works anywhere, not just on my machine. However, I can't get this to work:
[target.wasm32-wasip2]
runner = "wasmtime --dir ./my-subdir"this command works on the command line (but won't in the cargo/config.toml because the $PWD variable is not expanded)
wasmtime --dir "$PWD/test-libz-rs-sys" target/wasm32-wasip2/debug/deps/test_libz_rs_sys-b4a8595daba8c0ca.wasm
but this does not
wasmtime --dir "./test-libz-rs-sys" target/wasm32-wasip2/debug/deps/test_libz_rs_sys-b4a8595daba8c0ca.wasm
nor does this
wasmtime --dir "test-libz-rs-sys" target/wasm32-wasip2/debug/deps/test_libz_rs_sys-b4a8595daba8c0ca.wasm
I've seen that just "." is accepted, so I'm confused why "./test-libz-rs-sys" does not work. It would be really convenient if the path is expanded (though maybe there are security issues that I'm overlooking?). In any case the current behavior is unexpected (to me).
Versions and Environment
Wasmtime version or commit: wasmtime 31.0.0 (7a9be587f 2025-03-20)
Operating system: linux
Architecture: x86_64
Extra Info
Anything else you'd like to add?