From fd749070e29bd3856e5923136ea97260d933e3db Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 8 Apr 2024 00:52:51 +0300 Subject: refactor(tvix/nix-compat/wire): move magic bytes to worker_protocol `primitive.rs` implements reading and writing primitive (fixed-length) types in the wire format, used in the the nix daemon protocol and NAR format. Move worker-protocol specific magic bytes to worker_protocol.rs (and possibly further split there once needed) Change-Id: If681c01e9460294619f1d000229b81f0ac745810 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11377 Autosubmit: flokli Tested-by: BuildkiteCI Reviewed-by: picnoir picnoir --- tvix/nix-compat/src/wire/primitive.rs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'tvix/nix-compat/src/wire/primitive.rs') diff --git a/tvix/nix-compat/src/wire/primitive.rs b/tvix/nix-compat/src/wire/primitive.rs index 119053b89d..ee0f5fc427 100644 --- a/tvix/nix-compat/src/wire/primitive.rs +++ b/tvix/nix-compat/src/wire/primitive.rs @@ -4,13 +4,6 @@ use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt}; -// LE-encoded nixc on 64 bits. Because why not. -pub static MAGIC_HELLO: [u8; 8] = *b"cxin\0\0\0\0"; -// LE-encoded dxio on 64 bits. What's dxio? I have no clue. -pub static MAGIC_HELLO_RESPONSE: [u8; 8] = *b"oixd\0\0\0\0"; -// LE-encoded protocol version. -pub static PROTOCOL_VERSION: [u8; 8] = [0x23, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; - #[allow(dead_code)] /// Read a u64 from the AsyncRead (little endian). pub async fn read_u64(r: &mut R) -> std::io::Result { -- cgit 1.4.1