about summary refs log tree commit diff
path: root/tvix/nix-compat
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/nix-compat')
-rw-r--r--tvix/nix-compat/src/lib.rs2
-rw-r--r--tvix/nix-compat/src/wire/primitive.rs5
2 files changed, 6 insertions, 1 deletions
diff --git a/tvix/nix-compat/src/lib.rs b/tvix/nix-compat/src/lib.rs
index 60dcbdf25caa..d2849cbeae79 100644
--- a/tvix/nix-compat/src/lib.rs
+++ b/tvix/nix-compat/src/lib.rs
@@ -5,4 +5,4 @@ pub mod narinfo;
 pub mod nixbase32;
 pub mod nixhash;
 pub mod store_path;
-mod wire;
+pub mod wire;
diff --git a/tvix/nix-compat/src/wire/primitive.rs b/tvix/nix-compat/src/wire/primitive.rs
index ee0f5fc4279d..e675fcd2d106 100644
--- a/tvix/nix-compat/src/wire/primitive.rs
+++ b/tvix/nix-compat/src/wire/primitive.rs
@@ -4,6 +4,11 @@
 
 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";
+
 #[allow(dead_code)]
 /// Read a u64 from the AsyncRead (little endian).
 pub async fn read_u64<R: AsyncReadExt + Unpin>(r: &mut R) -> std::io::Result<u64> {