about summary refs log tree commit diff
path: root/tvix/nix-compat/src/wire/bytes.rs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-04-07 r/7870 refactor(tvix/nix-compat): drop read_bytes_uncheckedFlorian Klink1-15/+19
This isn't used anywhere so far, and if someone really wants to, they can simply make the range open-ended. Change-Id: Iae9bcaa1f7ea032dd3ee76c8c142a38b6b72894d Reviewed-on: https://cl.tvl.fyi/c/depot/+/11373 Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr> Tested-by: BuildkiteCI
2024-04-07 r/7867 feat(tvix/nix-compat): read client setting from wirePicnoir1-1/+19
Add the primitives necessary to read the client settings from the Nix daemon wire protocol. Introducing the read_string primitive. This trivial primitive parses a read_bytes call, check the bytes are valid utf-8 bytes and wraps the result in a String. Change-Id: Ie1253523a6bd4e31e7924e9898a0898109da2fa0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11358 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-04-04 r/7852 refactor(tvix/nix-compat): make padding_len pub(crate)Florian Klink1-1/+1
Let's make this usable for the entire crate. Change-Id: I754408908a00296ee80dd52680f84b8a7cb22317 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11354 Tested-by: BuildkiteCI Reviewed-by: Brian Olsen <me@griff.name> Autosubmit: flokli <flokli@flokli.de> Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr>
2024-04-03 r/7843 feat(tvix/nix-compat): introduce write_bytesPicnoir1-9/+62
Write counterpart of read_bytes. Despite its name, we mostly use it to write strings (as in ascii strings) to the wire. We also extract the padding calculation in its own function. Change-Id: I8d936e989961107261b3089e4275acbd2c093a7f Reviewed-on: https://cl.tvl.fyi/c/depot/+/11230 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-03-15 r/7700 docs(tvix): fix some docstringsFlorian Klink1-2/+2
Change-Id: Ife599387d0472cd746b992bd6755a2fb6a0e0dc4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11158 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2024-03-15 r/7697 feat(nix-compat/wire): add read_bytes[_unchecked]Florian Klink1-0/+130
This introduces a version reading sized byte packets. Both read_bytes, accepting a range of allowed sizes, as well as read_bytes_unchecked, which doesn't care, are added, including tests. Co-Authored-By: picnoir <picnoir@alternativebit.fr> Change-Id: I9fc1c61eb561105e649eecca832af28badfdaaa8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11150 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr> Tested-by: BuildkiteCI