about summary refs log tree commit diff
path: root/tvix/cli
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/cli')
-rw-r--r--tvix/cli/src/main.rs17
1 files changed, 6 insertions, 11 deletions
diff --git a/tvix/cli/src/main.rs b/tvix/cli/src/main.rs
index 90e3e0d59a20..048eddc531bf 100644
--- a/tvix/cli/src/main.rs
+++ b/tvix/cli/src/main.rs
@@ -7,6 +7,7 @@ mod tvix_io;
 
 use std::cell::RefCell;
 use std::rc::Rc;
+use std::sync::Arc;
 use std::{fs, path::PathBuf};
 
 use clap::Parser;
@@ -71,20 +72,14 @@ fn interpret(code: &str, path: Option<PathBuf>, args: &Args, explain: bool) -> b
 
     eval.strict = args.strict;
 
-    let blob_service = MemoryBlobService::default();
-    let directory_service = MemoryDirectoryService::default();
-    let path_info_service = MemoryPathInfoService::new(
-        Box::new(blob_service.clone()),
-        Box::new(directory_service.clone()),
-    );
+    let blob_service = Arc::new(MemoryBlobService::default());
+    let directory_service = Arc::new(MemoryDirectoryService::default());
+    let path_info_service =
+        MemoryPathInfoService::new(blob_service.clone(), directory_service.clone());
 
     eval.io_handle = Box::new(tvix_io::TvixIO::new(
         known_paths.clone(),
-        tvix_store::TvixStoreIO::new(
-            Box::new(blob_service),
-            Box::new(directory_service),
-            path_info_service,
-        ),
+        tvix_store::TvixStoreIO::new(blob_service, directory_service, path_info_service),
     ));
 
     // bundle fetchurl.nix (used in nixpkgs) by resolving <nix> to