{"id":13468281,"url":"https://github.com/eclipse-zenoh/zenoh","last_synced_at":"2025-05-12T11:18:12.257Z","repository":{"id":37772243,"uuid":"235377467","full_name":"eclipse-zenoh/zenoh","owner":"eclipse-zenoh","description":"zenoh unifies data in motion, data in-use, 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.","archived":false,"fork":false,"pushed_at":"2025-05-09T16:41:46.000Z","size":21740,"stargazers_count":1807,"open_issues_count":143,"forks_count":189,"subscribers_count":34,"default_branch":"main","last_synced_at":"2025-05-11T11:11:23.948Z","etag":null,"topics":["distributed-computing","distributed-storage","distributed-systems","edge-computing","embedded","geo-distributed-storages","iot","messaging","network-programming","networking","protocol","robotics","ros2","rust","rust-lang","storage","zenoh"],"latest_commit_sha":null,"homepage":"https://zenoh.io","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-zenoh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-21T15:38:53.000Z","updated_at":"2025-05-09T20:48:52.000Z","dependencies_parsed_at":"2024-06-16T20:51:49.323Z","dependency_job_id":"ad6aa0b5-c0ff-4628-a487-1617bf21eb93","html_url":"https://github.com/eclipse-zenoh/zenoh","commit_stats":{"total_commits":2395,"total_committers":43,"mean_commits":55.69767441860465,"dds":0.6855949895615867,"last_synced_commit":"2ad877ca1cb3eec4af450007e6b5b9706c5b8a32"},"previous_names":[],"tags_count":91,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-zenoh","download_url":"https://codeload.github.com/eclipse-zenoh/zenoh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253554090,"owners_count":21926614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distributed-computing","distributed-storage","distributed-systems","edge-computing","embedded","geo-distributed-storages","iot","messaging","network-programming","networking","protocol","robotics","ros2","rust","rust-lang","storage","zenoh"],"created_at":"2024-07-31T15:01:08.123Z","updated_at":"2025-05-11T11:11:45.862Z","avatar_url":"https://github.com/eclipse-zenoh.png","language":"Rust","readme":"\u003cimg src=\"https://raw.githubusercontent.com/eclipse-zenoh/zenoh/master/zenoh-dragon.png\" height=\"150\"\u003e\n\n[![CI](https://github.com/eclipse-zenoh/zenoh/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/eclipse-zenoh/zenoh/actions?query=workflow%3ACI+branch%3Amain++)\n[![Documentation Status](https://readthedocs.org/projects/zenoh-rust/badge/?version=latest)](https://zenoh-rust.readthedocs.io/en/latest/?badge=latest)\n[![codecov](https://codecov.io/github/eclipse-zenoh/zenoh/branch/main/graph/badge.svg?token=F8T4C8WPZD)](https://codecov.io/github/eclipse-zenoh/zenoh)\n[![Discussion](https://img.shields.io/badge/discussion-on%20github-blue)](https://github.com/eclipse-zenoh/roadmap/discussions)\n[![Discord](https://img.shields.io/badge/chat-on%20discord-blue)](https://discord.gg/2GJ958VuHs)\n[![License](https://img.shields.io/badge/License-EPL%202.0-blue)](https://choosealicense.com/licenses/epl-2.0/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n# Eclipse Zenoh\n\nThe Eclipse Zenoh: Zero Overhead Pub/sub, Store/Query and Compute.\n\nZenoh (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.\n\nCheck the website [zenoh.io](http://zenoh.io) and the [roadmap](https://github.com/eclipse-zenoh/roadmap) for more detailed information.\n\n-------------------------------\n\n## Getting Started\n\nZenoh is extremely easy to learn, the best place to master the fundamentals is our [getting started guide](https://zenoh.io/docs/getting-started/first-app/).\n\n-------------------------------\n\n## How to install it\n\nTo 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:\n\n### Manual installation (all platforms)\n\nAll release packages can be downloaded from [https://download.eclipse.org/zenoh/zenoh/latest/](https://download.eclipse.org/zenoh/zenoh/latest/).\n\nEach 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](https://doc.rust-lang.org/stable/rustc/platform-support.html).\n\nChoose your platform and download the `.zip` file.\nUnzip it where you want, and run the extracted `zenohd` binary.\n\n### Linux Debian\n\nAdd Eclipse Zenoh private repository to the sources list, and install the `zenoh` package:\n\n```bash\necho \"deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /\" | sudo tee -a /etc/apt/sources.list.d/zenoh.list \u003e /dev/null\nsudo apt update\nsudo apt install zenoh\n```\n\nThen you can start run `zenohd`.\n\n### MacOS\n\nTap our brew package repository and install the `zenoh` formula:\n\n```bash\nbrew tap eclipse-zenoh/homebrew-zenoh\nbrew install zenoh\n```\n\nThen you can start run `zenohd`.\n\n-------------------------------\n\n## Rust API\n\n* [Docs.rs for Zenoh](https://docs.rs/zenoh/latest/zenoh/)\n\n-------------------------------\n\n## How to build it\n\nInstall [Cargo and Rust](https://doc.rust-lang.org/cargo/getting-started/installation.html). Zenoh can be successfully compiled with Rust stable (\u003e= 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:\n\n```bash\nrustup update\n```\n\nTo build Zenoh, just type the following command after having followed the previous instructions:\n\n```bash\ncargo build --release --all-targets\n```\n\nZenoh'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.\n\n-------------------------------\n\n## Quick tests of your build\n\n### Peer-to-peer tests\n\n* **pub/sub**\n  * run: `./target/release/examples/z_sub`\n  * in another shell run: `./target/release/examples/z_put`\n  * the subscriber should receive the publication.\n\n* **get/queryable**\n  * run: `./target/release/examples/z_queryable`\n  * in another shell run: `./target/release/examples/z_get`\n  * the queryable should display the log in its listener, and the get should receive the queryable result.\n\n### Routed tests\n\n\u003e [!NOTE]\n\u003e **Windows users**: to properly execute the commands below in PowerShell you need to escape `\"` characters as `\\\"`.\n\n* **put / store / get**\n  * run the Zenoh router with a memory storage:\n\n    ```sh\n    ./target/release/zenohd --cfg='plugins/storage_manager/storages/demo:{key_expr:\"demo/example/**\",volume:\"memory\"}'\n    ```\n\n  * in another shell run:\n  \n    ```sh\n    ./target/release/examples/z_put`\n    ```\n\n  * then run\n\n    ```sh\n    ./target/release/examples/z_get\n    ```\n\n  * the get should receive the stored publication.\n\n* **REST API using `curl` tool**\n  * run the Zenoh router with a memory storage:\n\n    ```sh\n    ./target/release/zenohd --cfg='plugins/storage_manager/storages/demo:{key_expr:\"demo/example/**\",volume:\"memory\"}'\n    ```\n\n  * in another shell, do a publication via the REST API:\n\n    ```sh\n    curl -X PUT -d '\"Hello World!\"' http://localhost:8000/demo/example/test\n    ```\n\n  * get it back via the REST API:\n\n    ```sh\n    curl http://localhost:8000/demo/example/test\n    ```\n\n* **router admin space via the REST API**\n  * run the Zenoh router with permission to perform config changes via the admin space, and with a memory storage:\n\n    ```sh\n    ./target/release/zenohd --rest-http-port=8000 --adminspace-permissions=rw --cfg='plugins/storage_manager/storages/demo:{key_expr:\"demo/example/**\",volume:\"memory\"}'\n    ```\n\n  * in another shell, get info of the zenoh router via the zenoh admin space (you may use `jq` for pretty json formatting):\n\n    ```sh\n    curl -s http://localhost:8000/@/local/router | jq\n    ```\n\n  * get the volumes of the router (only memory by default):\n\n    ```sh\n    curl -s 'http://localhost:8000/@/local/router/**/volumes/*' | jq\n    ```\n\n  * get the storages of the local router (the memory storage configured at startup on '/demo/example/**' should be present):\n\n    ```sh\n    curl -s 'http://localhost:8000/@/local/router/**/storages/*' | jq\n    ```\n\n  * add another memory storage on `/demo/mystore/**`:\n\n    ```sh\n    curl -X PUT -H 'content-type:application/json' -d '{\"key_expr\":\"demo/mystore/**\",\"volume\":\"memory\"}' http://localhost:8000/@/local/router/config/plugins/storage_manager/storages/mystore\n    ```\n\n  * check it has been created:\n  \n    ```sh\n    curl -s 'http://localhost:8000/@/local/router/**/storages/*' | jq\n    ```\n\n### Configuration options\n\nA Zenoh configuration file can be provided via CLI to all Zenoh examples and the Zenoh router.\n\n* `-c, --config \u003cFILE\u003e`: a [JSON5](https://json5.org) configuration file. [DEFAULT_CONFIG.json5](DEFAULT_CONFIG.json5) shows the schema of this file and the available options.\n\nSee other examples of Zenoh usage in [examples/](examples)\n\n\u003e [!NOTE]\n\u003e **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](https://docs.rs/zenoh-runtime/latest/zenoh_runtime/enum.ZRuntime.html).\n\n-------------------------------\n\n## Zenoh router command line arguments\n\n`zenohd` accepts the following arguments:\n\n* `--adminspace-permissions \u003c[r|w|rw|none]\u003e`: Configure the read and/or write permissions on the admin space. Default is read only.\n* `-c, --config \u003cFILE\u003e`: a [JSON5](https://json5.org) configuration file. [DEFAULT_CONFIG.json5](DEFAULT_CONFIG.json5) shows the schema of this file. All properties of this configuration are optional, so you may not need such a large configuration for your use-case.\n* `--cfg \u003cKEY\u003e:\u003cVALUE\u003e`: allows you to change specific parts of the configuration right after it has been constructed. VALUE must be a valid JSON5 value, and key must be a path through the configuration file, where each element is separated by a `/`. When inserting in parts of the config that are arrays, you may use indexes, or may use `+` to indicate that you want to append your value to the array. `--cfg` passed values will always override any previously existing value for their key in the configuration.\n* `-l, --listen \u003cENDPOINT\u003e...`: An endpoint on which this router will listen for incoming sessions.\n  Repeat this option to open several listeners. By default, `tcp/[::]:7447` is used. The following endpoints are currently supported:\n  * TCP: `tcp/\u003chost_name_or_IPv4_or_IPv6\u003e:\u003cport\u003e`\n  * UDP: `udp/\u003chost_name_or_IPv4_or_IPv6\u003e:\u003cport\u003e`\n  * [TCP+TLS](https://zenoh.io/docs/manual/tls/): `tls/\u003chost_name\u003e:\u003cport\u003e`\n  * [QUIC](https://zenoh.io/docs/manual/quic/): `quic/\u003chost_name\u003e:\u003cport\u003e`\n* `-e, --connect \u003cENDPOINT\u003e...`: An endpoint this router will try to connect to. Repeat this option to connect to several peers or routers.\n* `--no-multicast-scouting`: By default zenohd replies to multicast scouting messages for being discovered by peers and clients.\n  This option disables this feature.\n* `-i, --id \u003chex_string\u003e`: The identifier (as an hexadecimal string - e.g.: A0B23...) that zenohd must use.\n   **WARNING**: this identifier must be unique in the system! If not set, a random unsigned 128bit integer will be used.\n* `--no-timestamp`: By default zenohd adds a HLC-generated Timestamp to each routed Data if there isn't already one.\n  This option disables this feature.\n* `-P, --plugin [\u003cPLUGIN_NAME\u003e | \u003cPLUGIN_NAME\u003e:\u003cLIBRARY_PATH\u003e]...`: A [plugin](https://zenoh.io/docs/manual/plugins/) that must be loaded. Accepted values:\n  * a plugin name; zenohd will search for a library named `libzenoh_plugin_\u003cname\u003e.so` on Unix, `libzenoh_plugin_\u003cPLUGIN_NAME\u003e.dylib` on MacOS or `zenoh_plugin_\u003cPLUGIN_NAME\u003e.dll` on Windows.\n  * `\"\u003cPLUGIN_NAME\u003e:\u003cLIBRARY_PATH\u003e\"`; the plugin will be loaded from library file at `\u003cLIBRARY_PATH\u003e`.\n\n  Repeat this option to load several plugins.\n* `--plugin-search-dir \u003cDIRECTORY\u003e...`: A directory where to search for [plugins](https://zenoh.io/docs/manual/plugins/) libraries to load.\n  Repeat this option to specify several search directories'. By default, the plugins libraries will be searched in:\n  `'/usr/local/lib:/usr/lib:~/.zenoh/lib:.'`\n* `--rest-http-port \u003crest-http-port\u003e`: Configures the [REST plugin](https://zenoh.io/docs/manual/plugin-http/)'s HTTP port. Accepted values:\n  * a port number\n  * a string with format `\u003clocal_ip\u003e:\u003cport_number\u003e` (to bind the HTTP server to a specific interface)\n  * `\"None\"` to deactivate the REST plugin\n\n  If not specified, the REST plugin will be active on any interface (`[::]`) and port `8000`.\n\n-------------------------------\n\n## Plugins\n\n\u003e [!WARNING]\n\u003e As Rust doesn't have a stable ABI, the plugins should be\nbuilt with the exact same Rust version as `zenohd`, and using for `zenoh` dependency the same version (or commit number) as `zenohd` with the same\nset 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.\n\nBy 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.\n\n**[REST plugin](https://zenoh.io/docs/manual/plugin-http/)** (exposing a REST API):\nThis plugin converts GET and PUT REST requests into Zenoh gets and puts respectively.\n\nNote 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).\n\n**[Storages plugin](https://zenoh.io/docs/manual/plugin-storage-manager/)** (managing [backends and storages](https://zenoh.io/docs/manual/plugin-storage-manager/#backends-and-volumes))\nThis 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](DEFAULT_CONFIG.json5) for info on how to configure them.\n\n-------------------------------\n\n## Troubleshooting\n\nIn case of troubles, please first check on [this page](https://zenoh.io/docs/getting-started/troubleshooting/) if the trouble and cause are already known.\nOtherwise, you can ask a question on the [zenoh Discord server](https://discord.gg/vSDSpqnbkm), or [create an issue](https://github.com/eclipse-zenoh/zenoh/issues).\n","funding_links":[],"categories":["Rust","Libraries","Recently Updated","Official API","Packages","📡 Robot Communication \u0026 Middleware"],"sub_categories":["Distributed systems","[Sep 04, 2024](/content/2024/09/04/README.md)","Network programming","Middleware"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-zenoh%2Fzenoh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-zenoh%2Fzenoh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-zenoh%2Fzenoh/lists"}