runng-sys
Rust FFI bindings to NNG (generated with bindgen):
NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery. The API frees the programmer from worrying about details like connection management, retries, and other common considerations, so that they can focus on the application instead of the plumbing.
Usage
Version of this crate tracks NNG: <NNG_version>-rc.<crate_version>
(e.g. 1.1.1-rc.2
).
To use the latest crate for the most recent stable version of NNG (1.1.1), in Cargo.toml
:
= "1.1.1-rc"
Requirements:
- cmake in
PATH
- On Linux/macOS: default generator is "Unix Makefiles" and should just work
- On Windows: default generator is ninja and must also be in
PATH
- libclang
For a more ergonomic API to NNG see runng.
Features
cmake-ninja
: use cmake generator "Ninja"cmake-vs2017
: use cmake generator "Visual Studio 15 2017"cmake-vs2017-win64
: use cmake generator "Visual Studio 15 2017 Win64"nng-stats
: enable NNG statsNNG_ENABLE_STATS
(enabled by default)nng-tls
: enable TLSNNG_ENABLE_TLS
(requires mbedTLS, disabled by default)
For example, to disable stats and use Ninja cmake generator:
[]
= "1.1.1-rc"
= false
= ["cmake-ninja"]
Examples
use *;
use ;