Skip to content

[Web] Add support for OPFS#19494

Merged
guan404ming merged 2 commits into
apache:mainfrom
akaashrp:opfs
May 6, 2026
Merged

[Web] Add support for OPFS#19494
guan404ming merged 2 commits into
apache:mainfrom
akaashrp:opfs

Conversation

@akaashrp

@akaashrp akaashrp commented May 2, 2026

Copy link
Copy Markdown
Contributor

Add OPFS as an alternative caching mechanism for artifacts: https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for the Origin Private File System (OPFS) as a new artifact cache type in the TVM JS/TS runtime, implementing the necessary storage and cache classes. Feedback focuses on optimizing the storage of large artifacts by streaming response bodies directly to the file system to prevent potential memory exhaustion. Additionally, it is suggested to extend the internal OPFS stream interface from the standard WritableStream to better support these streaming operations.

Comment thread web/src/opfs_store.ts Outdated
Comment thread web/src/opfs_store.ts Outdated
@akaashrp

akaashrp commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

cc @guan404ming for review

@guan404ming guan404ming left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@guan404ming guan404ming merged commit 75a48a0 into apache:main May 6, 2026
9 checks passed
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