Code Monkey home page Code Monkey logo

zmq.rs's Introduction

Build Status

NOTICE: THIS LIBRARY IS CURRENTLY UNDER REWRITING, PLEASE WAIT FOR A WHILE. THANK YOU FOR YOUR INTEREST!

zmq.rs - native stack of ØMQ in Rust

zmq.rs is a native implementation of ØMQ in the Rust programming language. It is still in a very early stage of designing and development, so it is not supposed to be used seriously now.

If you are looking for the libzmq wrapper in Rust, it is rust-zmq.

Ownership and License

The contributors are listed in AUTHORS. This project uses the MPL v2 license, see LICENSE.

zmq.rs uses the C4.1 (Collective Code Construction Contract) process for contributions.

zmq.rs uses this style guide found on Rust wiki for code style.

To report an issue, use the zmq.rs issue tracker at github.com.

Usage

There are only very few interfaces implemented till now. Try this example as src/hello-zmq.rs:

extern crate zeromq;

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

    let mut req = ctx.socket(zeromq::REQ);
    req.connect("tcp://127.0.0.1:12347").unwrap();

    let mut rep = ctx.socket(zeromq::REP);
    rep.bind("tcp://127.0.0.1:12347").unwrap();

    let mut msg = box zeromq::Msg::new(4);
    msg.data.push_all([65u8, 66u8, 67u8, 68u8]);

    req.msg_send(msg).unwrap();
    println!("We got: {}", rep.msg_recv().unwrap());
}

We recommend using cargo to build this program. Create a file Cargo.toml with:

[package]

name = "hello-zmq"
version = "0.1.0"
authors = ["[email protected]"]

[[bin]]

name = "hello-zmq"

[dependencies.zeromq]

git = "https://github.com/zeromq/zmq.rs.git"

Then build and run with cargo, who will automatically download and build the dependencies for you:

$ cargo build
$ ./target/hello-zmq

Documentation

API document can be found here, and there are tons of useful documentation at zeromq.org.

Development

Under C4.1 process, you are more than welcome to help us by:

  • join the discussion over anything from design to code style
  • try out and submit issue reports or feature requests
  • pick a task and get it done - there are plenty of them in the issues page
  • fork the repository and have your own fixes
  • send us pull requests
  • and even star this project ^_^

To run the test suite:

cargo test

Community

As for now it is just me (fantix). You can find me at:

zmq.rs's People

Contributors

axelmagn avatar daviddias avatar fantix avatar lerencao avatar yedpodtrzitko avatar zonyitoo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.