Stream: t-compiler/rust-analyzer

Topic: Should Vfs be a trait?


Josh Kuhn (Jun 17 2021 at 20:22, on Zulip):

I'm currently embedding the ide module into an application, and I had an idea that maybe I could potentially back the Vfs with something like Btrfs COW directories. But it's a concrete data type rather than a trait. Would it be reasonable to refactor it to be a trait to allow experimenting with different backends?

matklad (Jun 17 2021 at 21:46, on Zulip):

VFS is already polymorphic, see the loader module: https://github.com/matklad/rust-analyzer/blob/66673eae2b3d3185607d29ee341d2db8a81a46e0/crates/vfs/src/loader.rs#L1

Last update: Jul 27 2021 at 21:30UTC