Crates.io | zmq |
lib.rs | zmq |
version | 0.10.0 |
source | src |
created_at | 2014-11-11 18:04:32.296999 |
updated_at | 2022-11-04 09:52:26.603365 |
description | High-level bindings to the zeromq library |
homepage | |
repository | https://github.com/erickt/rust-zmq |
max_upload_size | |
id | 55 |
size | 206,611 |
Rust ZeroMQ bindings.
The zmq
crate provides bindings for the libzmq
library from the
ZeroMQ project. The API exposed by zmq
should
be safe (in the usual Rust sense), but it follows the C API closely,
so it is not very idiomatic.
The aim of this project is to track latest zmq releases as close as possible.
Regarding the minimum Rust version required, zmq
is CI-tested on current
stable channels of Rust.
zmq
is a pretty straight forward port of the C API into Rust:
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();
}
You can find more usage examples in https://github.com/erickt/rust-zmq/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.