### Install krb5 for GSS API on Windows Source: https://github.com/mgaertne/arzmq/blob/master/features.md Command to install krb5 on Windows using vcpkg, required for GSS API authorization. ```shell vcpkg install krb5 ``` -------------------------------- ### Install libsodium for CURVE on Windows Source: https://github.com/mgaertne/arzmq/blob/master/features.md Command to install libsodium on Windows using vcpkg, required for CURVE authorization. ```shell vcpkg install --triplet "x64-windows-md" libsodium ``` -------------------------------- ### Rust ZeroMQ Request-Reply Example Source: https://github.com/mgaertne/arzmq/blob/master/README.md Demonstrates setting up a ZeroMQ context, binding a reply socket, and connecting a request socket to send a message. It utilizes the arzmq crate for asynchronous ZeroMQ operations. ```rust use std::thread; use arzmq::prelude::{Context, RequestSocket, ReplySocket, SendFlags, Receiver, RecvFlags, Sender}; fn run_reply(context: &Context, endpoint: &str) { let socket = ReplySocket::from_context(context).unwrap(); socket.bind(endpoint).unwrap(); thread::spawn(move || { while socket.recv_msg(RecvFlags::DONT_WAIT).is_err() {} }); } fn main() { let ctx = Context::new().unwrap(); run_reply(&ctx, "tcp://127.0.0.1:1234"); let socket = RequestSocket::from_context(&ctx).unwrap(); socket.connect("tcp://127.0.0.1:1234").unwrap(); let _ = socket.send_msg("hello world!", SendFlags::DONT_WAIT); } ``` -------------------------------- ### Install libsodium for CURVE on MacOS Source: https://github.com/mgaertne/arzmq/blob/master/features.md Command to install libsodium on MacOS using Homebrew, necessary for CURVE authorization. ```shell brew install libsodium ``` -------------------------------- ### Install libgssapi-krb5 for GSS API on Linux Source: https://github.com/mgaertne/arzmq/blob/master/features.md Command to install the libgssapi-krb5 package on Linux systems using apt-get, required for GSS API authorization. ```bash sudo apt-get install libgssapi-krb5 ``` -------------------------------- ### Install libsodium for CURVE on Linux Source: https://github.com/mgaertne/arzmq/blob/master/features.md Command to install the libsodium development package on Linux systems using apt-get, required for CURVE authorization. ```bash sudo apt-get install libgsodium-dev ``` -------------------------------- ### Configure GSSAPI for MacOS Source: https://github.com/mgaertne/arzmq/blob/master/features.md Environment variables to set on MacOS to utilize the built-in Kerberos framework for GSSAPI authorization. ```shell export SYSTEM_DEPS_GSSAPI_LIB_FRAMEWORK=Kerberos export SYSTEM_DEPS_GSSAPI_NO_PKG_CONFIG=1 ``` -------------------------------- ### Conditional Compilation with zmq_has cfg - Rust Source: https://github.com/mgaertne/arzmq/blob/master/features.md Demonstrates how to conditionally compile Rust code based on whether a specific libzmq feature (like 'curve') is enabled and working. This uses the `zmq_has` attribute provided by the crate's build script. ```rust #[cfg(zmq_has = "curve")] fn only_working_when_curve_is_enabled_and_working() { ... } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.