about summary refs log tree commit diff
path: root/tvix/store/src/bin/tvix-store.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/bin/tvix-store.rs')
-rw-r--r--tvix/store/src/bin/tvix-store.rs17
1 files changed, 14 insertions, 3 deletions
diff --git a/tvix/store/src/bin/tvix-store.rs b/tvix/store/src/bin/tvix-store.rs
index 03ced18699..e4f2e0801b 100644
--- a/tvix/store/src/bin/tvix-store.rs
+++ b/tvix/store/src/bin/tvix-store.rs
@@ -6,6 +6,7 @@ use nix_compat::store_path::StorePath;
 use std::io;
 use std::path::Path;
 use std::path::PathBuf;
+use std::sync::Arc;
 use tokio::task::JoinHandle;
 use tokio_listener::Listener;
 use tokio_listener::SystemOptions;
@@ -21,6 +22,7 @@ use tvix_castore::proto::GRPCBlobServiceWrapper;
 use tvix_castore::proto::GRPCDirectoryServiceWrapper;
 use tvix_castore::proto::NamedNode;
 use tvix_store::pathinfoservice;
+use tvix_store::pathinfoservice::PathInfoService;
 use tvix_store::proto::nar_info;
 use tvix_store::proto::path_info_service_server::PathInfoServiceServer;
 use tvix_store::proto::GRPCPathInfoServiceWrapper;
@@ -217,9 +219,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
                 .add_service(DirectoryServiceServer::new(
                     GRPCDirectoryServiceWrapper::from(directory_service),
                 ))
-                .add_service(PathInfoServiceServer::new(
-                    GRPCPathInfoServiceWrapper::from(path_info_service),
-                ));
+                .add_service(PathInfoServiceServer::new(GRPCPathInfoServiceWrapper::new(
+                    path_info_service,
+                )));
 
             #[cfg(feature = "tonic-reflection")]
             {
@@ -257,6 +259,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
             )
             .await?;
 
+            // Arc the PathInfoService, as we clone it .
+            let path_info_service: Arc<dyn PathInfoService> = path_info_service.into();
+
             let tasks = paths
                 .into_iter()
                 .map(|path| {
@@ -356,6 +361,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
             )
             .await?;
 
+            // Arc the PathInfoService, as TvixStoreFS requires Clone
+            let path_info_service: Arc<dyn PathInfoService> = path_info_service.into();
+
             let mut fuse_daemon = tokio::task::spawn_blocking(move || {
                 let f = TvixStoreFs::new(
                     blob_service,
@@ -397,6 +405,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
             )
             .await?;
 
+            // Arc the PathInfoService, as TvixStoreFS requires Clone
+            let path_info_service: Arc<dyn PathInfoService> = path_info_service.into();
+
             tokio::task::spawn_blocking(move || {
                 let fs = TvixStoreFs::new(
                     blob_service,