Stream: wasmtime

Topic: wasmtime file system access


view this post on Zulip Jonathan H (Jun 19 2025 at 01:50):

Hi, all. I can access individual files in a wasm component through WasiCtxBuilder.preopened_dir. Is it possible to give a component direct access (or something like it, perhaps by opening the file system root) to the filesystem? I'd like to allow the component to access arbitrary files.

view this post on Zulip Jonathan H (Jun 19 2025 at 01:55):

Actually, I think I just figured it out. I had to use Unix-like paths with / as the separator in the component. Is that a indeed a requirement? I did not see that anywhere.

view this post on Zulip Lann Martin (Jun 19 2025 at 02:49):

https://github.com/WebAssembly/wasi-filesystem/blob/e2a2ddc6cdcd9093d4bb5db0c44eb93d4c9c013b/wit/types.wit#L13 :slight_smile:

Filesystem API for WASI. Contribute to WebAssembly/wasi-filesystem development by creating an account on GitHub.

view this post on Zulip Jonathan H (Jun 19 2025 at 03:20):

lol ty


Last updated: Dec 06 2025 at 06:05 UTC