snix/tvix/glue
Florian Klink 4535824166 refactor(tvix/glue): move toFile to import builtins
This does import the contents into the store, so it should belong in there.

While moving, I also noticed the code copying to the BlobService can be
shared with the one used when importing a blob via import helper.
It was a bit hidden - due to the contents being available as a bytes, we
used a Cursor and wrote it with tokio::io::copy.

However, Cursor implements both AsyncRead and Read, so we can factor out
the copying code into a copy_to_blobservice helper function and use it
in both places.

The output name being wrong error kind arguably is still a bit misplaced
here, but that's left for later.

Change-Id: Iec3c422c12270ee111f864d2b78c0861f78edfa4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13254
Reviewed-by: Domen Kožar <domen@cachix.org>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2025-03-13 12:08:04 +00:00
..
benches refactor(tvix/glue): remove use of lazy_static 2024-10-13 14:45:17 +00:00
src refactor(tvix/glue): move toFile to import builtins 2025-03-13 12:08:04 +00:00
build.rs fix(tvix): make rstest pick up new test case files 2024-06-05 17:52:17 +00:00
Cargo.toml chore(tvix): simplify Cargo.toml 2024-12-30 10:23:31 +00:00
default.nix chore(tvix): Retain original passthru in Rust builds 2024-08-15 23:37:00 +00:00