Look who's talking!

Detail illustration WASM I/O Detail illustration WASM I/O
Daniel Phillips

Building Ephemeral Virtual Filesystems for WebAssembly

Daniel Phillips - Loophole Labs

Many programs need filesystems, and a common approach for Wasm-compiled applications is to make the host filesystem available to the module. Why not the other way around? Let’s bring a virtualized filesystem to the WebAssembly module itself, and see what we learn in the process.

The unix philosophy that “everything is a file” is a fundamental idea that powers platforms that run a huge amount of software today. If we want Wasm to be a deployment target for existing applications, we have to grapple with this fact and figure out how we intend to approach the problem of filesystems and filesystem-like entities in this new platform.

The WebAssembly System Interface (WASI) takes the position of providing scoped access to the underlying host for these operations. However, what if we went the opposite direction? Why not bring a filesystem to the Wasm environment?

This talk will describe what currently exists in and around this space, how WASI approaches the problem, alternatives, including Emscripten’s filesystem and wasi-vfs, and also a series of experiments for another idea of “ephemeral” virtual filesystems that are generated for specific modules depending on the needs of the application logic.

I will walk through these various options, the experiments, and a path forward for this type of approach to interacting with filesystem entities in Wasm modules.


View all sessions