bytecodealliance / wasmtime-dotnet

.NET embedding of Wasmtime https://bytecodealliance.github.io/wasmtime-dotnet/
Apache License 2.0
409 stars 52 forks source link

Filesystem interception #238

Open chutchinson opened 1 year ago

chutchinson commented 1 year ago

Is it possible with these bindings to intercept filesystem operations, or would one have to redefine WASI functions such as fd_read, fd_write, etc? Is a virtual filesystem implementation or filesystem interception supported by wasmtime (but perhaps not this binding? I may be interested in that contribution).

peterhuene commented 1 year ago

I don't believe any of the Wasmtime language bindings make it easy to implement an alternative WASI implementation for intercepting certain operations.

Wasmtime (and these bindings) allow for alternative, host-defined WASI-named functions to be defined in a Linker (for example), but you would need to supply your own implementation.