posit-dev / r-shinylive

https://posit-dev.github.io/r-shinylive/
Other
151 stars 16 forks source link

Mounting file systems for shinylive apps running via Node.js #46

Open seanbirchall opened 7 months ago

seanbirchall commented 7 months ago

The webr documentation on mounting is super helpful. Will it be possible to mount a file system from the host machine using NODEFS and make that file system accessible to a shinylive app?

schloerke commented 7 months ago

@georgestagg . Thoughts?

georgestagg commented 7 months ago

Sorry, this is not possible right now with shinylive.

The NODEFS filesystem type is designed for use with webR running under Node.js. Since shinylive is running directly in a web browser, NODEFS cannot be used.

There is a web-based File System API designed for allowing access to local files from the host machine, but browser support is still a little patchy (there are also some other technical blockers for using this in webR, unrelated to shinylive).

In the future, when these roadblocks have been removed, it's possible this could be added to webR's mounting API, but it's not currently planned in the short term. Instead, we will be focusing on improving shinylive's integration with Emscripten's WORKERFS filesystem images for mounting user packages and data.