pijul nest
guest [sign in]

Implementing the handshake call in the protocol

pmeunier
Aug 16, 2025, 3:14 PM
NT4JHHKXB7ARESVKFQAQCMFJUEIJDHKCTU4KAMBX7ZWIONJTL3JAC

Dependencies

  • [2] LIMIMBOU Bootstrapping the Rust part

Change contents

  • edit in src/server.rs at line 61
    [2.1651]
    [2.1651]
    async fn handshake(
    &self,
    request: tonic::Request<proto::Empty>,
    ) -> Result<tonic::Response<proto::PlatformReply>, tonic::Status> {
    Ok(proto::PlatformReply {
    endianness: if cfg!(target_endian = "big") { 0 } else { 1 },
    pointer_width: std::mem::size_of::<usize>() as i32,
    arch: match std::env::consts::ARCH {
    "x86_64" => 0,
    "aarch64" => 1,
    _ => unimplemented!(),
    },
    }
    .into())
    }