Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on persistent file system access in browsers #393

Closed
vincent-herlemont opened this issue Dec 28, 2023 · 3 comments
Closed

Comments

@vincent-herlemont
Copy link

vincent-herlemont commented Dec 28, 2023

When you talk about 'FileSystem access' in browsers, does this mean that the data is persistent? Through OPFS or another storage offered by browsers?


Context vincent-herlemont/native_db#65

Copy link

linear bot commented Dec 28, 2023

@Michael-F-Bryan
Copy link
Contributor

When you use the new Directory() constructor, it will create a temporary in-memory filesystem that is backed by a virtual_fs::mem_fs::FileSystem.

In #337, I'm adding a static Directory.fromBrowser() function which will create a Directory backed by the browser's FileSystem API. That means you'd be able to mount a directory backed by OPFS or the FileSystemDirectoryHandle you get from window.showDirectoryPicker().

That PR hasn't been merged yet, but that's mainly because we chose to implement the easier in-memory version first and add support for the FileSystem API after making @wasmer/sdk public.

@MentalGear
Copy link

MentalGear commented Jan 19, 2024

Amazing work! Any indication when persistent OPFS will be available? This would allow for such high-demand applications like vector search in the browser by the very popular usearch library.

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

No branches or pull requests

3 participants