From 7e737fde34260daa477794d63b0b3344b4a1d81b Mon Sep 17 00:00:00 2001 From: Connor Brewster Date: Sat, 16 Sep 2023 13:54:10 -0500 Subject: refactor(tvix/store/fs): Separate FUSE and filesystem code In prepration for adding virtiofs support, I thought it would make sense to split out the filesystem implementation from FUSE itself. The `fs` module holds the tvix-store filesystem implemetation and the `fuse` module holds the code to spawn a FUSE daemon backed by multiple threads. Change-Id: I8c58447b8c3aa016a613068f8e7ec166554e237c Reviewed-on: https://cl.tvl.fyi/c/depot/+/9343 Reviewed-by: flokli Tested-by: BuildkiteCI Autosubmit: Connor Brewster --- tvix/store/src/bin/tvix-store.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tvix/store/src/bin/tvix-store.rs') diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs index f707e3850d4f..1be8b00bd9b8 100644 --- a/tvix/store/src/bin/tvix-store.rs +++ b/tvix/store/src/bin/tvix-store.rs @@ -22,7 +22,12 @@ use tvix_store::proto::GRPCPathInfoServiceWrapper; use tvix_store::proto::NamedNode; use tvix_store::proto::NarInfo; use tvix_store::proto::PathInfo; -use tvix_store::{FuseDaemon, FUSE}; + +#[cfg(feature = "fs")] +use tvix_store::fs::TvixStoreFs; + +#[cfg(feature = "fuse")] +use tvix_store::fs::fuse::FuseDaemon; #[cfg(feature = "reflection")] use tvix_store::proto::FILE_DESCRIPTOR_SET; @@ -302,7 +307,7 @@ async fn main() -> Result<(), Box> { )?; let mut fuse_daemon = tokio::task::spawn_blocking(move || { - let f = FUSE::new( + let f = TvixStoreFs::new( blob_service, directory_service, path_info_service, -- cgit 1.4.1