News for hackers. Stuff that matters.
Re:In-Memory Filesystems in Rust by kolektiv on Monday August 25, 2025 @06:30AM (#45012355)
It's not always about mocking (in my cases it hasn't been). Sometimes it is about multiple "real" implementations - a filesystem is itself an abstraction, and a very common one, it seems like it would at least sometimes be useful to be able to leverage that more flexibly.
Re:In-Memory Filesystems in Rust by eru on Monday August 25, 2025 @06:40AM (#45012402)
I have a little system that takes a .git and mounts it as a fuse filesystem. Every commit becomes a directory with a snapshot of the project at that point in time.

You could read the whole .git in at once, and then you'd have an in-memory file-system, if you wanted to.

In any case, I agree with you: it's not about mocking.

Re:In-Memory Filesystems in Rust by kryptiskt on Monday August 25, 2025 @07:16AM (#45012595)
Some examples where it would be useful: Exposing a zip file or exe-embedded data as a filesystem, or making an FS backed by 9P, WebDAV or SFTP.