5 releases (breaking)

0.5.0 Mar 4, 2022
0.4.0 Mar 4, 2022
0.3.0 Mar 4, 2022
0.2.0 Mar 1, 2022
0.1.0 Feb 27, 2022

#1950 in Network programming

Download history 107/week @ 2023-08-06 252/week @ 2023-08-13 104/week @ 2023-08-20 67/week @ 2023-08-27 146/week @ 2023-09-03 123/week @ 2023-09-10 100/week @ 2023-09-17 71/week @ 2023-09-24 119/week @ 2023-10-01 76/week @ 2023-10-08 105/week @ 2023-10-15 126/week @ 2023-10-22 157/week @ 2023-10-29 182/week @ 2023-11-05 172/week @ 2023-11-12 115/week @ 2023-11-19

651 downloads per month
Used in 26 crates (6 directly)



Rust ZeroMQ bindings.

Travis Build Status Appveyor Build status Coverage Status Apache 2.0 licensed MIT licensed crates.io docs


Release Notes


The zmq2 crate provides bindings for the libzmq library from the ZeroMQ project. This project is a fork of the https://github.com/erickt/rust-zmq project, with the intent of keeping it actively maintained.

This project removes the cmake dependency of this project, as well as update the dependencies. It has also removed the pkgconfig build in favor of always building a vendored version of this library.


The aim of this fork is to track latest zmq releases as close as possible, while in the beginning aming to be a drop in replacement of the original zmq library. Though over time we'll most likely abandon that, in favor of our own library features.


zmq2 is a pretty straight forward port of the C API into Rust:

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

    let socket = ctx.socket(zmq2::REQ).unwrap();
    socket.send("hello world!", 0).unwrap();

You can find more usage examples in https://github.com/Traverse-Research/zmq2/tree/master/examples.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed under the terms of both the Apache License, Version 2.0 and the MIT license without any additional terms or conditions.

See the contribution guidelines for what to watch out for when submitting a pull request.


~20K SLoC