From f3d8c633f2b4c44a6911d751a2efd93ef926a8bf Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 4 Apr 2024 19:03:44 +0300 Subject: feat(tvix/nix-compat/wire): introduce BytesWriter 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 Autosubmit: flokli Reviewed-by: Brian Olsen Tested-by: BuildkiteCI --- tvix/nix-compat/Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tvix/nix-compat/Cargo.toml') diff --git a/tvix/nix-compat/Cargo.toml b/tvix/nix-compat/Cargo.toml index 6e3df0485db1..6fc55d5c016e 100644 --- a/tvix/nix-compat/Cargo.toml +++ b/tvix/nix-compat/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -async = ["futures-util", "tokio"] +async = ["futures-util", "tokio", "pin-project-lite"] [dependencies] bitflags = "2.4.1" @@ -29,6 +29,10 @@ optional = true version = "1.32.0" features = ["io-util", "macros"] +[dependencies.pin-project-lite] +optional = true +version = "0.2.13" + [dev-dependencies] futures = { version = "0.3.30", default-features = false, features = ["executor"] } lazy_static = "1.4.0" -- cgit 1.4.1