about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tvix/Cargo.lock1
-rw-r--r--tvix/Cargo.nix4
-rw-r--r--tvix/cli/Cargo.toml1
-rw-r--r--tvix/cli/src/main.rs19
4 files changed, 24 insertions, 1 deletions
diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock
index ad5bbeed5340..4716e0e66067 100644
--- a/tvix/Cargo.lock
+++ b/tvix/Cargo.lock
@@ -2640,6 +2640,7 @@ dependencies = [
  "ssri",
  "thiserror",
  "tvix-eval",
+ "tvix-store",
  "wu-manber",
 ]
 
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix
index f7cc72d6f815..332c2834f809 100644
--- a/tvix/Cargo.nix
+++ b/tvix/Cargo.nix
@@ -7770,6 +7770,10 @@ rec {
             packageId = "tvix-eval";
           }
           {
+            name = "tvix-store";
+            packageId = "tvix-store";
+          }
+          {
             name = "wu-manber";
             packageId = "wu-manber";
           }
diff --git a/tvix/cli/Cargo.toml b/tvix/cli/Cargo.toml
index 1dd59a2329f7..676da02a07a2 100644
--- a/tvix/cli/Cargo.toml
+++ b/tvix/cli/Cargo.toml
@@ -9,6 +9,7 @@ path = "src/main.rs"
 
 [dependencies]
 nix-compat = { path = "../nix-compat" }
+tvix-store = { path = "../store" }
 tvix-eval = { path = "../eval" }
 rustyline = "10.0.0"
 clap = { version = "4.0", features = ["derive", "env"] }
diff --git a/tvix/cli/src/main.rs b/tvix/cli/src/main.rs
index 9a81cff50863..c588472592cf 100644
--- a/tvix/cli/src/main.rs
+++ b/tvix/cli/src/main.rs
@@ -14,6 +14,9 @@ use known_paths::KnownPaths;
 use rustyline::{error::ReadlineError, Editor};
 use tvix_eval::observer::{DisassemblingObserver, TracingObserver};
 use tvix_eval::{Builtin, Value};
+use tvix_store::blobservice::MemoryBlobService;
+use tvix_store::directoryservice::MemoryDirectoryService;
+use tvix_store::pathinfoservice::MemoryPathInfoService;
 
 #[derive(Parser)]
 struct Args {
@@ -63,9 +66,23 @@ fn interpret(code: &str, path: Option<PathBuf>, args: &Args, explain: bool) -> b
     let known_paths: Rc<RefCell<KnownPaths>> = Default::default();
 
     eval.strict = args.strict;
+
+    let blob_service = MemoryBlobService::default();
+    let directory_service = MemoryDirectoryService::default();
+    let path_info_service = MemoryPathInfoService::default();
+    let nar_calculation_service = tvix_store::nar::NonCachingNARCalculationService::new(
+        blob_service.clone(),
+        directory_service.clone(),
+    );
+
     eval.io_handle = Box::new(tvix_io::TvixIO::new(
         known_paths.clone(),
-        nix_compat::NixCompatIO::new(),
+        tvix_store::TvixStoreIO::new(
+            blob_service,
+            directory_service,
+            path_info_service,
+            nar_calculation_service,
+        ),
     ));
 
     // bundle fetchurl.nix (used in nixpkgs) by resolving <nix> to