about summary refs log tree commit diff
path: root/tvix/eval/src/lib.rs
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2022-08-25T15·00-0400
committergrfn <grfn@gws.fyi>2022-08-25T16·01+0000
commitf648cec78e9115527e4c135a9e3f7083abe9e5be (patch)
treebb655137caf5d112efdfd6c2a04da3fc855f21c7 /tvix/eval/src/lib.rs
parent63a0cc83d13ebce3ae17c45778c4f25e831f1b7b (diff)
feat(tvix/eval): Expose interpret + related types from lib r/4488
Add a new `lib.rs` to tvix/eval, which `pub use`s the `interpret`
function, and all types mentioned in its return type, and then uses
*this* instead of direct `mod` statements in the `main.rs` to implement
the entrypoints to the interpreter. This is in preparation for calling
these functions from integrated benchmarking infrastructure using
Criterion, though other things (like integration tests) might want to do
that as well.

Change-Id: I7b585134a96b1c56a2ac64d2036b0e51d321bd27
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6155
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/lib.rs')
-rw-r--r--tvix/eval/src/lib.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tvix/eval/src/lib.rs b/tvix/eval/src/lib.rs
new file mode 100644
index 000000000000..75cd246424bb
--- /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;