dispatchrun / wasi-go

A Go implementation of the WebAssembly System Interface (WASI)
Apache License 2.0
124 stars 7 forks source link

wasi: add wasi.System adapter to fs.FS #50

Closed achille-roussel closed 1 year ago

achille-roussel commented 1 year ago

The Go stdlib has a great test suite in testing/fstest to validate the implementation of file-system-like types. I added a wasi.FS function which wraps a wasi.System and creates an adapter between the two interfaces so we can use the test suite to verify the behavior of WASI systems.

The tests highlighted one issue with the selection of open flags in path_open, which is fixed here as well.