Replies: 2 comments 4 replies
-
|
@dotnet/wasm-eng might have better insights on this topic. I think we might need certain API proposal to cover "I/O APIs which accept filesystem argument" for various filesystem offerings by emscripten: https://emscripten.org/docs/api_reference/Filesystem-API.html#file-systems. |
Beta Was this translation helpful? Give feedback.
-
|
WASMFS is mostly interesting for performance and multi-threading reasons. I don't have any experience with it's current maturity, but the fact it's not a default tells me it's not ready for prime time. As far as I remember, this is first time someone is asking for persistent FS as a dotnet WASM feature. Unless there is stronger signal from the community, I don't think we are going to prioritize it. I would like to hear more about the use-case. Why do you prefer files over other persistent APIs ? I think Emscripten |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Background and motivation
.NET WASM applications currently use Emscripten's in-memory file system (MEMFS).
All file data is lost on page refresh, making
System.IOAPIs effectively uselessfor persistent storage scenarios.
The Origin Private File System (OPFS) is now supported by all major browsers
(Chrome 108+, Safari 16.4+, Firefox 111+) and provides persistent, high-performance
file storage designed specifically for WASM workloads.
Current state
(e.g., separate worker instances, manual JS interop)
Desired outcome
Standard
System.IO.Fileoperations should be able to persist to OPFS whenconfigured, allowing existing .NET code and NuGet packages to work with
persistent browser storage:
Primary use cases:
References
Questions for the team
Beta Was this translation helpful? Give feedback.
All reactions