atlanticaccent / starsector-mod-manager-rust

A mod manager for Starsector, a space fleet-battle and economics simulator. This time written in Rust.
https://atlanticaccent.github.io/starsector-mod-manager-rust/
MIT License
33 stars 1 forks source link

Utilise a virtual filesystem to reduce filesystem clutter #53

Closed atlanticaccent closed 3 years ago

atlanticaccent commented 3 years ago

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.

atlanticaccent commented 3 years ago

Investigations indicate this would be very difficult, as most archive libs expect OS paths or strings of OS paths

atlanticaccent commented 3 years ago

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.