about summary refs log tree commit diff
path: root/tvix/eval/src/builtins
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/builtins')
-rw-r--r--tvix/eval/src/builtins/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs
index ebbc5e336c21..6098bba1e48f 100644
--- a/tvix/eval/src/builtins/mod.rs
+++ b/tvix/eval/src/builtins/mod.rs
@@ -115,6 +115,13 @@ fn pure_builtins() -> Vec<Builtin> {
                 })
             })
         }),
+        Builtin::new("bitXor", 2, |args, vm| {
+            force!(vm, &args[0], x, {
+                force!(vm, &args[1], y, {
+                    Ok(Value::Integer(x.as_int()? ^ y.as_int()?))
+                })
+            })
+        }),
         Builtin::new("catAttrs", 2, |mut args, _| {
             let list = args.pop().unwrap().to_list()?;
             let key = args.pop().unwrap().to_str()?;