As far as I know, we can use preopened_dir to preopen some directories and give WASM binary a limited filesystem access. However, I can't find a simple way to give the binary a full filesystem access. The following code doesn't work (with wasi-cap-std-sync) on Windows:
WasiCtxBuilder::new().preopened_dir(cap_std::fs::Dir::from_std_file(std::fs::File::open("/")?), "/")?.build()
I would also like a cross-platform way to give full filesystem access.
As far as I know, we can use
preopened_dirto preopen some directories and give WASM binary a limited filesystem access. However, I can't find a simple way to give the binary a full filesystem access. The following code doesn't work (withwasi-cap-std-sync) on Windows:I would also like a cross-platform way to give full filesystem access.