about summary refs log tree commit diff
path: root/tvix/eval/src/builtins/impure.rs
AgeCommit message (Collapse)AuthorFilesLines
2022-10-04 r/5027 feat(tvix/eval): implement `builtins.currentTime`Vincent Ambo1-2/+12
Returns time since epoch in seconds. This has a slight behaviour difference from Nix, in that we don't pin the time between REPL entries (Nix pins it for the program lifetime), but this is probably inconsequential as long as it is pinned during an evaluation. Change-Id: I010c02e93097a209d8ad69e278397c7e30e54c86 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6846 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com>
2022-10-04 r/5026 refactor(tvix/eval): allow impure Value builtinsVincent Ambo1-3/+22
Allows impure builtins that have a different shape than a Rust function pointer; specifically this is required for builtins.currentTime which does not work in WASM. Change-Id: I1362d8eeafe770ce4d1c5ebe4d119aeb0abb5c9b Reviewed-on: https://cl.tvl.fyi/c/depot/+/6849 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com>
2022-09-22 r/4954 feat(tvix/eval): Sketch out impure builtinsGriffin Smith1-0/+7
Sketch out a new set of "impure" builtins, which supplement the existing set of "pure" builtins but are gated behind a feature flag, which allows them to be omitted by crates depending on tvix-eval that only want pure evaluation, such as tvixbolt. Change-Id: I2736017b5c9b4776bbba8758e108ec84887abd66 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6655 Reviewed-by: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su>