-
Note
These are rough ideas.
They are not guaranteed features and could change significantly in any actual implementation.
Community feedback is appreciated
There are various use-cases and scenarios where more customization and configuration would be helpful. Additionally, implementing these configurations within the "emulation" or virtualization layer would come with some performance and extensibility benefits.
1. read-only
At the moment, read-only file systems must use a mixin. Additionally, there is no way to use a read-write file system as read-only. It would be nice to be able to configure a file system to be read-only independent of whether the file system is actually read-only:
await configure({ mounts: { '/': { backend: InMemory, readonly: true, } } }); fs.writeFileSync('/example.txt'); // EROFS
This would allow for some more complex configurations, and allow (for example) a consuming Unix simulator to support /etc/fstab's ro option.
2. copy-on-write
Going further, file systems that only support read-only operations, like Fetch, can often times be difficult to use:
await configure({ mounts: { '/': { backend: Overlay, readable: Fetch, writable: InMemory, } } });
In addition to proper typing, this would also make it more clear what is actually happening:
await configure({ mounts: { '/': { backend: Fetch, copy_on_write: true, write_to: InMemory, } } });
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1