diff options
Diffstat (limited to 'tvix/eval/src/builtins/mod.rs')
-rw-r--r-- | tvix/eval/src/builtins/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index 605c7c2607ef..009758fe0f33 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -101,6 +101,13 @@ fn pure_builtins() -> Vec<Builtin> { Ok(Value::List(NixList::construct(output.len(), output))) }) }), + Builtin::new("bitAnd", 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()?; |