Stream: wasmtime

Topic: preopen cwd on windows?


view this post on Zulip fitzgen (he/him) (Jan 25 2021 at 23:53):

Opening the current working directory keeps failing on windows for me. Fails when I use "." instead of std::env::current_dir() too.

Anyone happen to know the magic incantation to make this work?

Maybe @Peter Huene?

And pass through the WASM_BENCH_USE_SMALL_WORKLOAD env var. Part of bytecodealliance/sightglass#70
And pass through the WASM_BENCH_USE_SMALL_WORKLOAD env var. Part of bytecodealliance/sightglass#70

view this post on Zulip Peter Huene (Jan 26 2021 at 00:19):

To open a directory on Windows, you need FILE_FLAG_BACKUP_SEMANTICS set in the flags.

view this post on Zulip Peter Huene (Jan 26 2021 at 00:19):

https://github.com/bytecodealliance/wasmtime/blob/47ff726c610cb935dc6caacae1613278038853d4/crates/wasi-common/src/sys/windows/mod.rs#L80-L94

Standalone JIT-style runtime for WebAssembly, using Cranelift - bytecodealliance/wasmtime

view this post on Zulip fitzgen (he/him) (Jan 26 2021 at 17:49):

thanks, I was getting confused because when I did "jump to definition" preopen_dir was just doing File::open, but this is because I'm on linux and I didn't realize there were different modules cfg'd on or off depending on target

anyways, thanks again!


Last updated: Oct 23 2024 at 20:03 UTC