Closed atlanticaccent closed 3 years ago
Investigations indicate this would be very difficult, as most archive libs expect OS paths or strings of OS paths
Barring an implementation that creates a virtual file system extant outside of the program (ie: some form of memory mapped filesystem that also is accessible through the OS filesystem and manipulatable in code) this approach is generally infeasibly - closing due to the unlikeliness of it being implementable.
Using the rust-vfs crate (https://github.com/manuel-woelker/rust-vfs), archives could be extracted into memory, verified for integrity, and discarded afterwards. This means that if anything goes horribly wrong during installation, ideally nothing will actually be written to the actual filesystem.
This may not necessarily work, however. The current archive implementation simply calls out to different archive libs, which take as inputs archive paths and output directories. It remains to be seen if a virtual file path can simply dropped in as a replacement output for all these libs.