emscripten-core / emscripten-core/emscripten

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

Open
#12,428 4 comments 1 reaction 0 assignees View on GitHub
wasmfs
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.