about summary refs log tree commit diff
path: root/tvix/eval/src/vm.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-01-20T13·00+0300
committerclbot <clbot@tvl.fyi>2023-01-20T22·48+0000
commit6d03e310603869b7ad67bd00f8eb858e362bd763 (patch)
treea1380724f4d41e72a7d3a131574b4baabfb2440c /tvix/eval/src/vm.rs
parent23a5d730f7852bdff21acfadd2d4f9d1aa4c4081 (diff)
docs(tvix/eval): add doc comments to VM fields r/5714
Change-Id: Ia4857c217de15aec8b61e1abd39e22c50e2d816a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7876
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r--tvix/eval/src/vm.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs
index 60006ea76f9c..b42b47c2dc01 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -109,12 +109,20 @@ pub struct VM<'o> {
     /// Runtime warnings collected during evaluation.
     warnings: Vec<EvalWarning>,
 
+    /// Import cache, mapping absolute file paths to the value that
+    /// they compile to. Note that this reuses thunks, too!
+    // TODO: should probably be based on a file hash
     pub import_cache: Box<BTreeMap<PathBuf, Value>>,
 
+    /// Parsed Nix search path, which is used to resolve `<...>`
+    /// references.
     nix_search_path: NixSearchPath,
 
+    /// Implementation of I/O operations used for impure builtins and
+    /// features like `import`.
     io_handle: Box<dyn EvalIO>,
 
+    /// Runtime observer which can print traces of runtime operations.
     observer: &'o mut dyn RuntimeObserver,
 }