about summary refs log tree commit diff
path: root/tvix/nix-compat/src/wire/mod.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-03-14T15·03+0200
committerclbot <clbot@tvl.fyi>2024-03-15T10·35+0000
commit5fccbe5939b376d56690cdf8ebcab61f7e852d86 (patch)
tree94d332760c57754105ffcc9c0bf0bb36f11ab05e /tvix/nix-compat/src/wire/mod.rs
parentc364c0b4de92698dae2d3822821f23c48e8b2ccc (diff)
feat(nix-compat/wire): add read_bytes[_unchecked] r/7697
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
Diffstat (limited to 'tvix/nix-compat/src/wire/mod.rs')
-rw-r--r--tvix/nix-compat/src/wire/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tvix/nix-compat/src/wire/mod.rs b/tvix/nix-compat/src/wire/mod.rs
index e0b184c78aec..9444ebbcfe59 100644
--- a/tvix/nix-compat/src/wire/mod.rs
+++ b/tvix/nix-compat/src/wire/mod.rs
@@ -2,4 +2,7 @@
 //! nix-daemon protocol as well as in the NAR format.
 
 #[cfg(feature = "async")]
+pub mod bytes;
+
+#[cfg(feature = "async")]
 pub mod primitive;