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

Overlay FileSystem #3677

Merged
merged 12 commits into from
Mar 16, 2023
Merged

Overlay FileSystem #3677

merged 12 commits into from
Mar 16, 2023

Conversation

Michael-F-Bryan
Copy link
Contributor

@Michael-F-Bryan Michael-F-Bryan commented Mar 13, 2023

This adds a wasmer_vfs::overlay_fs::OverlayFileSystem which allows you to "overlay" multiple wasmer_vfs::FileSystem implementations.

As opposed to the wasmer_vfs::union_fs::UnionFileSystem, which allows you to mount disjointed filesystems, the OverlayFileSystem has a single primary filesystem and zero or more secondary filesystems, where a items from a filesystem with higher precedence will shadow items from a lower precedence filesystem.

We want this as part of #3650.

lib/vfs/src/filesystem_ext.rs Outdated Show resolved Hide resolved
lib/vfs/src/overlay_fs.rs Outdated Show resolved Hide resolved
lib/vfs/src/overlay_fs.rs Outdated Show resolved Hide resolved
lib/vfs/src/overlay_fs.rs Show resolved Hide resolved
lib/vfs/src/filesystems.rs Show resolved Hide resolved
Copy link
Member

@syrusakbary syrusakbary left a comment

Choose a reason for hiding this comment

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

Once the comments are addressed (except of the one suggesting a different design for OverlayFS) and the tests pass, I think we should be good to go.

Also, side comment: I think we should make WebC read only for now (basically, panic/fail on any write operation on it, and we will remove the memory filesystem on it ->

pub memory: Arc<MemFileSystem>,
)
If things fully work then I think we should be good to go! (note: we can do that as part of other PR if that's easier)

@Michael-F-Bryan Michael-F-Bryan merged commit e480583 into master Mar 16, 2023
@Michael-F-Bryan Michael-F-Bryan deleted the overlay-fs branch March 16, 2023 10:41
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.

3 participants