about summary refs log tree commit diff
path: root/tvix/nix-compat/src/wire/bytes_writer.rs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-04-08 r/7872 refactor(tvix/nix-compat/wire): simplify write_bytes a bitFlorian Klink1-3/+2
Use the same EMPTY_BYTES trick from BytesWriter to write out the padding, rather than allocating a Vec. Change-Id: Ifb4ba1b45b7388adbc135fc8e46fd3d3cedd30aa Reviewed-on: https://cl.tvl.fyi/c/depot/+/11375 Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-04-06 r/7857 feat(tvix/nix-compat/wire): introduce BytesWriterFlorian Klink1-0/+514
This deals with writing byte packets of larger sizes to an underlying AsyncWrite. Its constructor receives the expected size. It also deals with writing padding if flush/shutdown is called after writing all the payload. Change-Id: I8acbf992467f3862ffb8c7d669e8c0c8eced14c1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11355 Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr> Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Brian Olsen <me@griff.name> Tested-by: BuildkiteCI