lightning-fs icon indicating copy to clipboard operation
lightning-fs copied to clipboard

Native File System API

Open agentcooper opened this issue 6 years ago • 5 comments

Hey. I see that some work was already done in https://github.com/isomorphic-git/lightning-fs/tree/feat/native. What is the timeline for this and what are the current blockers?

For reference: https://www.chromestatus.com/feature/6284708426022912.

agentcooper avatar Oct 17 '19 20:10 agentcooper

Aha! Yes, I'm super excited about this. The current blocker is currently File handles cannot be serialized. This means they can't be sent to a Worker thread via postMessage. Which is very unfortunate, because that means you're restricted to using the main thread, which is already over burdened. All my "realistic" app architectures require using isomorphic-git and LightningFS in a worker in order to stay within performance budgets.

As soon as Chrome lands support for serializing them, I'm going to revive that branch and finish it. The other nice thing we'll be able to do is save the file handles in IndexedDb so you won't have to prompt the user with a permissions UX every time they re-open the page.

billiegoose avatar Mar 01 '20 04:03 billiegoose

@wmhilton File handlers can be serialized and can be sent to a Worker thread via postMessage as of Chrome 83 😉

Capture

Twaha-Rahman avatar May 11 '20 14:05 Twaha-Rahman

I am currently working on a project https://github.com/0xGG/vscode-pwa and I implemented two file system providers for the vscode running on the web: One uses lightning-fs for constructing the memfs; the other one was handwritten using the native file system api.

https://github.com/0xGG/vscode-pwa also uses isomorphic-git for managing git repos. It would be great if lighting-fs can support native file system so I could better refactor my code :+1:

Thanks for the awesome project!

shd101wyy avatar Apr 27 '21 15:04 shd101wyy

@wmhilton any updates/progress on the native branch?

predmond avatar May 07 '21 22:05 predmond