Home

Awesome

<img src="https://raw.githubusercontent.com/eclipse-zenoh/zenoh/master/zenoh-dragon.png" height="150">

CI Documentation Status Discussion Discord License License

Eclipse Zenoh

The Eclipse Zenoh: Zero Overhead Pub/sub, Store/Query and Compute.

Zenoh (pronounce /zeno/) unifies data in motion, data at rest and computations. It carefully blends traditional pub/sub with geo-distributed storages, queries and computations, while retaining a level of time and space efficiency that is well beyond any of the mainstream stacks.

Check the website zenoh.io and the roadmap for more detailed information.


Getting Started

Zenoh is extremely easy to learn, the best place to master the fundamentals is our getting started guide.


How to install it

To install the latest release of the Zenoh router (zenohd) and its default plugins (REST API plugin and Storages Manager plugin) you can do as follows:

Manual installation (all platforms)

All release packages can be downloaded from https://download.eclipse.org/zenoh/zenoh/latest/.

Each subdirectory has the name of the Rust target. See the platforms each target corresponds to on https://doc.rust-lang.org/stable/rustc/platform-support.html.

Choose your platform and download the .zip file. Unzip it where you want, and run the extracted zenohd binary.

Linux Debian

Add Eclipse Zenoh private repository to the sources list, and install the zenoh package:

echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | sudo tee -a /etc/apt/sources.list.d/zenoh.list > /dev/null
sudo apt update
sudo apt install zenoh

Then you can start run zenohd.

MacOS

Tap our brew package repository and install the zenoh formula:

brew tap eclipse-zenoh/homebrew-zenoh
brew install zenoh

Then you can start run zenohd.


Rust API


How to build it

[!WARNING] Zenoh and its ecosystem are under active development. When you build from git, make sure you also build from git any other Zenoh repository you plan to use (e.g. binding, plugin, backend, etc.). It may happen that some changes in git are not compatible with the most recent packaged Zenoh release (e.g. deb, docker, pip). We put particular effort in maintaining compatibility between the various git repositories in the Zenoh project.

Install Cargo and Rust. Zenoh can be successfully compiled with Rust stable (>= 1.75.0), so no special configuration is required from your side. If you already have the Rust toolchain installed, make sure it is up-to-date with:

rustup update

To build Zenoh, just type the following command after having followed the previous instructions:

cargo build --release --all-targets

Zenoh's router is built as target/release/zenohd. All the examples are built into the target/release/examples directory. They can all work in peer-to-peer, or interconnected via the zenoh router.


Quick tests of your build

Peer-to-peer tests

Routed tests

[!NOTE] Windows users: to properly execute the commands below in PowerShell you need to escape " characters as \".

Configuration options

A Zenoh configuration file can be provided via CLI to all Zenoh examples and the Zenoh router.

See other examples of Zenoh usage in examples/

[!NOTE] Zenoh Runtime Configuration: Starting from version 0.11.0-rc, Zenoh allows for configuring the number of worker threads and other advanced options of the runtime. For guidance on utilizing it, please refer to the doc.


Zenoh router command line arguments

zenohd accepts the following arguments:


Plugins

[!WARNING] As Rust doesn't have a stable ABI, the plugins should be built with the exact same Rust version as zenohd, and using for zenoh dependency the same version (or commit number) as zenohd with the same set of features. A plugin compiled with different Rust version or with different set of zenoh crate features will be rejected when zenohd attempts to load it. Otherwise, incompatibilities in memory mapping of structures shared between zenohd and the library could lead to a "SIGSEGV" crash.

By default the Zenoh router is delivered or built with 2 plugins. These may be configured through a configuration file, or through individual changes to the configuration via the --cfg CLI option or via zenoh puts on individual parts of the configuration.

[!WARNING] Since v0.6, zenohd no longer loads every available plugin at startup. Instead, only configured plugins are loaded (after processing --cfg and --plugin options). Once zenohd is running, plugins can be hot-loaded and, if they support it, reconfigured at runtime by editing their configuration through the adminspace.

REST plugin (exposing a REST API): This plugin converts GET and PUT REST requests into Zenoh gets and puts respectively.

Note that to activate the REST plugin on zenohd the CLI argument should be passed: --rest-http-port=8000 (or any other port of your choice).

Storages plugin (managing backends and storages) This plugin allows you to easily define storages. These will store key-value pairs they subscribed to, and send the most recent ones when queried. Check out DEFAULT_CONFIG.json5 for info on how to configure them.


Troubleshooting

In case of troubles, please first check on this page if the trouble and cause are already known. Otherwise, you can ask a question on the zenoh Discord server, or create an issue.