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

Adds ZipFS to the existing solutions #4

Merged
merged 2 commits into from
Aug 18, 2022
Merged

Adds ZipFS to the existing solutions #4

merged 2 commits into from
Aug 18, 2022

Conversation

arcanis
Copy link
Contributor

@arcanis arcanis commented Aug 5, 2022

Yarn has been using a filesystem layer over Node for all PnP applications for a few years now. It's well-maintained, used in production, covered by tests (although there's no way to run the Node.js test suite over it, which is too bad), and supports almost all Node features (including fds, buffer paths, file watching, ...).

We use it to package every dependency, including those with bin entries (for instance, when you run yarn eslint, it runs it straight from the zip archive thanks to this layer).

Here's what the implementation looks like:
https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-fslib/sources/ZipFS.ts

@RaisinTen
Copy link
Contributor

Does it make sense to put this under a new section called "Virtual File System Implementations" because IIUC, the zip is separate from the executable?

@jviotti
Copy link
Member

jviotti commented Aug 5, 2022

Thanks @arcanis ! I agree with @RaisinTen . Let's add a new section called Virtual File System Implementations with a new table, and ZipFS in there!

@RaisinTen
Copy link
Contributor

@jviotti done - #7!

@arcanis
Copy link
Contributor Author

arcanis commented Aug 5, 2022

Sure 👍 I'll wait for #7 to be merged and update my PR accordingly

@RaisinTen
Copy link
Contributor

@arcanis #7 has been merged btw :)

@cspotcode
Copy link

FWIW long ago I prototyped a simplification of nexe that replaced its virtual FS thing (custom, buggy, limited) with ZipFS. (robust, feature-complete, maintained) I was able to bake a zip into the binary (was not a separate file) and use ZipFS to mount it as a virtual filesystem.

I think it's a cool idea, worth investigating.

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#7 got merged sooo, :shipit:

arcanis and others added 2 commits August 18, 2022 16:48
Signed-off-by: Darshan Sen <raisinten@gmail.com>
Copy link
Contributor

@RaisinTen RaisinTen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved the ZipFS part to VFS implementations and force-pushed. Landing now!

@RaisinTen RaisinTen merged commit d4a0900 into main Aug 18, 2022
@RaisinTen RaisinTen deleted the mael/zipfs branch August 18, 2022 11:21
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

Successfully merging this pull request may close these issues.

5 participants