Skip to content

[RFC] Writable WORKERFS#17397

Open
famz wants to merge 1 commit intoemscripten-core:mainfrom
famz:workerfs-writables
Open

[RFC] Writable WORKERFS#17397
famz wants to merge 1 commit intoemscripten-core:mainfrom
famz:workerfs-writables

Conversation

@famz
Copy link

@famz famz commented Jul 8, 2022

Hello,

From wasm currently there is no easy way to generate large output files. MEMFS based approaches are all limited to the size of available memory.

This small patch adds a postMessage to WORKERFS' stream_ops.write callback, on predefined entries passed in at mount time, called "writables", alongside the existing "files" and "blobs" arguments, which semantically are writeonly files that can be persisted or streamed in browswer context in the onmessage handler.

While the patch is apparently not intended for merging, I'm looking for feedback on how this can be taken forward.

I've looked at @connorjclark 's fsfs PR and that is also depending on MEMFS so it cannot solve the problem.

This patch is verified to work as intended in handling large output files in my ffmpeg wasm app.

Thanks,

@tlively
Copy link
Member

tlively commented Jul 12, 2022

There's also the new WasmFS system we are building that should be able to handle larger files via its JS backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants