Use the zmq crate for ZeroMQ bindings
masterThe zmq crate provides Rust bindings for the libzmq library. While the API is designed to be safe in the Rust sense, it follows the C API closely and may not feel idiomatic to Rust developers.
To use it, you typically create a zmq::Context, then create sockets from that context, and finally perform operations like connect, send, or recv.
fn main() {
let ctx = zmq::Context::new();
let socket = ctx.socket(zmq::REQ).unwrap();
socket.connect("tcp://127.0.0.1:1234").unwrap();
socket.send("hello world!", 0).unwrap();
}