about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tvix/eval/src/lib.rs14
-rw-r--r--tvix/eval/src/main.rs13
2 files changed, 15 insertions, 12 deletions
diff --git a/tvix/eval/src/lib.rs b/tvix/eval/src/lib.rs
new file mode 100644
index 0000000000..75cd246424
--- /dev/null
+++ b/tvix/eval/src/lib.rs
@@ -0,0 +1,14 @@
+mod chunk;
+mod compiler;
+mod errors;
+mod eval;
+mod opcode;
+mod value;
+mod vm;
+
+#[cfg(test)]
+mod tests;
+
+pub use crate::errors::EvalResult;
+pub use crate::eval::interpret;
+pub use crate::value::Value;
diff --git a/tvix/eval/src/main.rs b/tvix/eval/src/main.rs
index a8e2bea647..41d9ed36bd 100644
--- a/tvix/eval/src/main.rs
+++ b/tvix/eval/src/main.rs
@@ -4,17 +4,6 @@ use std::{
     mem, process,
 };
 
-mod chunk;
-mod compiler;
-mod errors;
-mod eval;
-mod opcode;
-mod value;
-mod vm;
-
-#[cfg(test)]
-mod tests;
-
 fn main() {
     let mut args = env::args();
     if args.len() > 2 {
@@ -50,7 +39,7 @@ fn run_prompt() {
 }
 
 fn run(code: String) {
-    match eval::interpret(&code) {
+    match tvix_eval::interpret(&code) {
         Ok(result) => println!("=> {} :: {}", result, result.type_of()),
         Err(err) => eprintln!("{}", err),
     }