I've built and open-sourced a new thing - WebAssembly shell with a real filesystem access in a browser.
You can access the live version here: https://wasi.rreverser.com/
Check out the code here: https://github.com/GoogleChromeLabs/wasi-fs-access
Or watch a video demonstrating some of the powerful features:
It provides WASI bindings implementation that proxies any filesystem requests to a real, host filesystem. This allows apps built in languages like C, C++, Rust and others to be compiled to WebAssembly and work as usual within a browser sandbox, accessing and manipulating files in a "real world".
A Rust port of coreutils with some patches was chosen for the demo purposes, but it should be possible to extract and reuse same bindings for any applications compiled for the WebAssembly + WASI target.
Note that some commands in the demo might not work due to either limitations of the WASI itself (such as an absent concept of "current working directory" and, correspondingly, relative paths and such), limitations of the File System Access API (such as an absent support for symlinks), or simply due to hardcoded assumptions about the target system in the used coreutils codebase itself. Most of those limitations can be easily worked around or will be naturally fixed as both APIs develop over time.
Want to learn more?
Check out my presentation from the WebAssembly Live! here: https://www.slideshare.net/RReverser/asyncifying-webassembly-for-the-modern-web
I'll also write a more detailed blog post later, but, meanwhile, feel free to check out the code and ping me on Twitter with any questions.