You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repo contains an Emscripten filesystem implementation that uses Storage
Foundation API as a backend. It must be run within a Web Worker, since it uses
the synchronous version of the API.
NOTE: This filesystem is incomplete, it will be updated (and cleaned) as more
parts of Storage Foundation API become accessible. Missing pieces include
rename, setting attributes, sub-directories, etc.
An example C++ program (example.cpp) is included. It show basic file operations
and how to read a file from JavaScript.
The mount_filesystems.js script shows how multiple filesystems can be made
accessible to one module.
To see the result run the following with Chrome M91 or higher:
emrun --serve_after_exit --no_browser index.html
And then open the following link in a Chrome instance with the
"Experimental Web Platform features" flag enabled:
localhost:6931.
Experimental Asynchronous Filesystem
An experimental attempt at an asynchronous Emscripten file system is included in
folder async/. Unfortunately, it requires to modify the emscripten runtime by
exchanging the syscalls in src/library_syscalls.js and src/library_wasi.js
with their asynchronous counterparts of async/library_syscall_async.js. This
has to be done by manually replacing them in the files; we are working on a more
convenient method.