All Projects → jean-airoldie → Libzmq Rs

jean-airoldie / Libzmq Rs

Licence: other
A strict subset of ØMQ with an ergonomic API.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Libzmq Rs

Gopherjs Electron
Gopherjs bindings for Electron with an API translator.
Stars: ✭ 26 (-51.85%)
Mutual labels:  bindings
Ad Edwarthogenhancedscript
An Advanced & Highly Customisable Elite Dangerous Thrustmaster Warthog Script + ED Bindings Pack that utilises Modifiers, allowing for all commands to be easily accessible on the HOTAS. Includes many Quality of Life features to get the most enjoyment out of ED!
Stars: ✭ 39 (-27.78%)
Mutual labels:  bindings
Hs Zstd
Bindings to the Zstandard library to make it usable from the Haskell programming language.
Stars: ✭ 45 (-16.67%)
Mutual labels:  bindings
Eve Live
EVELive provides real-time pricing data for the MMORPG EVE Online
Stars: ✭ 8 (-85.19%)
Mutual labels:  zeromq
Cuda
Experiments with CUDA and Rust
Stars: ✭ 31 (-42.59%)
Mutual labels:  bindings
Rusqlite
Ergonomic bindings to SQLite for Rust
Stars: ✭ 1,008 (+1766.67%)
Mutual labels:  bindings
Dynamicwindowapproach
The Dynamic Window Approach planning algorithm written in C with Python Bindings
Stars: ✭ 17 (-68.52%)
Mutual labels:  bindings
01cnode
tool to monitor full bitcoin node bitcoind-web
Stars: ✭ 50 (-7.41%)
Mutual labels:  zeromq
Zeroeq
Cross-platform C++ library for fast binary and REST messaging
Stars: ✭ 35 (-35.19%)
Mutual labels:  zeromq
Zeromq Ng
⚡️ Next-generation Node.js bindings to the ZeroMQ library
Stars: ✭ 45 (-16.67%)
Mutual labels:  zeromq
Mruby Actor
A actor library for distributed mruby
Stars: ✭ 11 (-79.63%)
Mutual labels:  zeromq
Soloud Rs
Rust bindings for the soloud audio engine library
Stars: ✭ 21 (-61.11%)
Mutual labels:  bindings
Glue
⛓️ Bindings that stick. A simple and generic API for C++ to other language bindings supporting bidirectional communication, inheritance and automatic declarations.
Stars: ✭ 44 (-18.52%)
Mutual labels:  bindings
Tablebinding
Swift NSTableView bound to an NSArrayController
Stars: ✭ 8 (-85.19%)
Mutual labels:  bindings
Binaryen Rs
Binaryen bindings for Rust.
Stars: ✭ 48 (-11.11%)
Mutual labels:  bindings
Bluezero
Middleware for distributed applications
Stars: ✭ 17 (-68.52%)
Mutual labels:  zeromq
Vst2
Bindings for vst2 sdk
Stars: ✭ 39 (-27.78%)
Mutual labels:  bindings
Llvm D
D bindings for LLVM
Stars: ✭ 50 (-7.41%)
Mutual labels:  bindings
Cppzmq
Header-only C++ binding for libzmq
Stars: ✭ 1,045 (+1835.19%)
Mutual labels:  zeromq
Genepi
Automatic generation of N-API wrapper from a C++ library
Stars: ✭ 45 (-16.67%)
Mutual labels:  bindings

⚠️ I wouldn't recommand using ZeroMQ or any ZeroMq bindings library (including libzmq-rs), unless you absolutely have to. If you do, then libzmq-rs might fit your use case since it basically makes ZeroMQ not a complete footgun. However, just because this library hides the unmaintainable mess that is ZeroMQ, doesn't mean the mess does not exist. See this comment for more context.

Apache 2.0 licensed MIT licensed

libzmq-rs

A strict subset of ØMQ with an ergonomic API.

[dependencies]
libzmq = "0.2"

Dead Simple Sample

use libzmq::{prelude::*, *};
use std::convert::TryInto;

// Use a system assigned port.
let addr: TcpAddr = "127.0.0.1:*".try_into()?;

let server = ServerBuilder::new()
    .bind(addr)
    .build()?;

// Retrieve the addr that was assigned.
let bound = server.last_endpoint()?;

let client = ClientBuilder::new()
    .connect(bound)
    .build()?;

// Send a string request.
client.send("tell me something")?;

// Receive the client request.
let msg = server.recv_msg()?;
let id = msg.routing_id().unwrap();

// Reply to the client.
server.route("it takes 224 bits to store a i32 in java", id)?;

// We can reply as much as we want.
server.route("also don't talk to me", id)?;

// Retreive the first reply.
let mut msg = client.recv_msg()?;
// And the second.
client.recv(&mut msg)?;

Installation

This crate builds and generates bindings from source. This means that you do not need to install libzmq. However building from source requires:

General Goals

  • Conform to these API guidelines.
  • Provide an ergonomic API
  • Prevent footguns (which are plentifull in libzmq)
  • Minimize the learning curve
  • Don't sacrifice any performance
  • Extensively document

To do so we will only use a subset of libzmq. If you'd rather have a complete port, check out rust-zmq.

Frequently Asked Questions

See the FAQ.

Acknowledgements

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in libzmq by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].