tvl-depot/tvix/eval/src/compiler
Connor Brewster 63116d8c21 fix(tvix): Avoid buffering file into memory in builtins.hashFile
Right now `builtins.hashFile` always reads the entire file into memory
before hashing, which is not ideal for large files. This replaces
`read_to_string` with `open_file` which allows calculating the hash of
the file without buffering it entirely into memory. Other callers can
continue to buffer into memory if they choose, but they still use the
`open_file` VM request and then call `read_to_string` or `read_to_end`
on the `std::io::Reader`.

Fixes b/380

Change-Id: Ifa1c8324bcee8f751604b0b449feab875c632fda
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11236
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-04-09 17:31:58 +00:00
..
bindings.rs refactor(tvix/eval): add SourceCode directly into error types 2024-02-20 09:18:08 +00:00
import.rs fix(tvix): Avoid buffering file into memory in builtins.hashFile 2024-04-09 17:31:58 +00:00
mod.rs feat(tvix/eval): Store string context alongside data 2024-02-21 20:53:04 +00:00
optimiser.rs refactor(tvix/eval): remove redundant clone 2023-02-16 22:42:14 +00:00
scope.rs refactor(tvix/eval): administer antidote for poison 2023-01-21 10:19:15 +00:00