From 36b296609b0d4db633f78a6fa3685f61227af94a Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 10 Apr 2024 14:54:11 +0300 Subject: refactor(tvix/nix-compat): reorganize wire and bytes Move everything bytes-related into its own module, and re-export both bytes and primitive in a flat space from wire/mod.rs. Expose this if a `wire` feature flag is set. We only have `async` stuff in here. Change-Id: Ia4ce4791f13a5759901cc9d6ce6bd6bbcca587c7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11389 Autosubmit: flokli Reviewed-by: raitobezarius Tested-by: BuildkiteCI Reviewed-by: Brian Olsen --- users/picnoir/tvix-daemon/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'users/picnoir/tvix-daemon/src/main.rs') diff --git a/users/picnoir/tvix-daemon/src/main.rs b/users/picnoir/tvix-daemon/src/main.rs index 82220637c6..3350100128 100644 --- a/users/picnoir/tvix-daemon/src/main.rs +++ b/users/picnoir/tvix-daemon/src/main.rs @@ -4,7 +4,7 @@ use tokio_listener::{self, SystemOptions, UserOptions}; use tracing::{debug, error, info, instrument, Level}; use nix_compat::wire::{ - primitive, + self, worker_protocol::{self, server_handshake_client, ClientSettings, Trust}, }; @@ -80,7 +80,7 @@ where // TODO: implement logging. For now, we'll just send // STDERR_LAST, which is good enough to get Nix respond to // us. - primitive::write_u64(&mut client_connection.conn, worker_protocol::STDERR_LAST) + wire::write_u64(&mut client_connection.conn, worker_protocol::STDERR_LAST) .await .unwrap(); loop { @@ -112,6 +112,6 @@ where worker_protocol::read_client_settings(&mut conn.conn, conn.version_minor).await?; // The client expects us to send some logs when we're processing // the settings. Sending STDERR_LAST signal we're done processing. - primitive::write_u64(&mut conn.conn, worker_protocol::STDERR_LAST).await?; + wire::write_u64(&mut conn.conn, worker_protocol::STDERR_LAST).await?; Ok(settings) } -- cgit 1.4.1