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

discussion - feasibility to integrate https://wicg.github.io/file-system-access/ #422

Closed
kaizhu256 opened this issue Oct 2, 2020 · 2 comments

Comments

@kaizhu256
Copy link
Member

one of sql.js biggest limitation is inability to persist largish databases (e.g. 1gb) to local filesystem.

that might finally be overcome with newly proposed https://wicg.github.io/file-system-access (note spec's motivation appears mainly saving data in web-editors and ides).
they have an experimental demo here

feasibility question - what additional spec read/write features are needed to allow sql.js to use spec to persist to local filesystem?

spec's current capabilities are (from what i gather):

read

  • await FileSystemHandle.file() // method returns blob/file object

write

  • await FileSystemWritableFileStream.write(data)
  • await FileSystemWritableFileStream.write({ type: "write", data: data })
  • await FileSystemWritableFileStream.write({ type: "write", position: position, data: data })
  • await FileSystemWritableFileStream.write({ type: "seek", position: position })
  • await FileSystemWritableFileStream.write({ type: "truncate", size: size })
@lovasoa
Copy link
Member

lovasoa commented Oct 2, 2020

This is an interesting spec. However this is probably something that will be integrated at the emscripten level, and not at the level of individual libraries.

@kaizhu256
Copy link
Member Author

k, moving this issue to emscripten-core/emscripten#12428

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

2 participants