Rust zeromq bindings.
Latest commit be88b5f Nov 17, 2016 @karec karec committed with rotty Add ZMQ_STREAM socket type
This is basically pull request #109, with the following tweaks added:

- Add example to Cargo.toml and remove "zmq" from directory name to more
  closely match current practice.

- Use ephemeral port bound to localhost, using `get_last_endpoint()` in
  test suite, to avoid potential collisions with test environment.

Fixes #95.

Rust ZeroMQ bindings.

Travis Build Status Appveyor Build status Coverage Status Apache 2.0 licensed MIT licensed


Currently, rust-zmq requires ZeroMQ 3.2 or newer. For example, on recent Debian-based distributions, you can use the following command to get the prerequiste headers and library installed:

apt install libzmq3-dev

If your OS of choice does not provide packages of a new-enough libzmq, you will first have to install it from source; see

rust-zmq uses cargo to install. Users should add this to their Cargo.toml file:

git = ""

Install for developers:

% git clone
% cd rust-zmq
% cargo build


rust-zmq is a pretty straight forward port of the C API into Rust:

extern crate zmq;

fn main() {
    let ctx = zmq::Context::new();

    let mut socket = ctx.socket(zmq::REQ).unwrap();
    socket.send_str("hello world!", 0).unwrap();

You can find more usage examples in