about summary refs log blame commit diff
path: root/tvix/eval/src/builtins/impure.rs
blob: 41e3805b2d0e79ff427d12cd487b2bccb8b10bda (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                      


                                                                                                   






                                                               
 
use std::{
    collections::BTreeMap,
    time::{SystemTime, UNIX_EPOCH},
};

use smol_str::SmolStr;

use crate::{
    value::{Builtin, NixString},
    Value,
};

fn impure_builtins() -> Vec<Builtin> {
    vec![]
}

/// Return all impure builtins, that is all builtins which may perform I/O outside of the VM and so
/// cannot be used in all contexts (e.g. WASM).
pub(super) fn builtins() -> BTreeMap<NixString, Value> {
    let mut map: BTreeMap<NixString, Value> = impure_builtins()
        .into_iter()
        .map(|b| (b.name().into(), Value::Builtin(b)))
        .collect();

    map
}