emscripten-core / emscripten-core/emscripten
discussion - feasibility to integrate `https://wicg.github.io/file-system-access/`
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
a serious limitation of downstream libraries like sql.js 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](https://googlechromelabs.github.io/text-editor/)
feasibility question - what additional spec read/write features are needed to integrate emscripten with file-system-access?
spec's current read/write 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 })
Contributor guide
Assessment
This issue has not been assessed yet.