{"id":18300536,"url":"https://github.com/eclipse-zenoh/zenoh-cpp","last_synced_at":"2026-03-16T13:11:35.891Z","repository":{"id":103147992,"uuid":"557305846","full_name":"eclipse-zenoh/zenoh-cpp","owner":"eclipse-zenoh","description":"C++ API for zenoh","archived":false,"fork":false,"pushed_at":"2024-10-24T00:26:22.000Z","size":1249,"stargazers_count":49,"open_issues_count":10,"forks_count":29,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-10-24T15:07:00.716Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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}},"created_at":"2022-10-25T12:58:51.000Z","updated_at":"2024-10-22T10:48:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6c22f00-7c30-43ad-98a1-14d36d67cad9","html_url":"https://github.com/eclipse-zenoh/zenoh-cpp","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-zenoh%2Fzenoh-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-zenoh","download_url":"https://codeload.github.com/eclipse-zenoh/zenoh-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595335,"owners_count":20963943,"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":[],"created_at":"2024-11-05T15:12:45.497Z","updated_at":"2026-03-16T13:11:35.885Z","avatar_url":"https://github.com/eclipse-zenoh.png","language":"C++","funding_links":[],"categories":["Official API"],"sub_categories":[],"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-cpp/workflows/CI/badge.svg)](https://github.com/eclipse-zenoh/zenoh-cpp/actions?query=workflow%3A%22CI%22)\n[![Documentation Status](https://readthedocs.org/projects/zenoh-cpp/badge/?version=latest)](https://zenoh-cpp.readthedocs.io/en/latest/?badge=latest)\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# C++ API\n\nThe Zenoh C++ API are headers only C++ bindings for [zenoh-c] and [zenoh-pico] libraries.\n\nC++ bindings are still under active development so the Zenoh team will highly appreciate any help in testing them on various platforms, system architecture, etc. and to report any issue you might encounter. This will help in greatly improving its maturity and robustness.\n\n## Requirements\n\nThe only hard requirement for building the library is a C++17-compliant compiler.\nUsing the library requires either [zenoh-c] or [zenoh-pico] to be installed.\n\n-------------------------------\n\n## How to build and install it\n\nTo install [zenoh-cpp] do the following steps:\n\n1. Clone the sources.\n\n   ```bash\n   git clone https://github.com/eclipse-zenoh/zenoh-cpp.git\n   ```\n\n2. Build and install.\n\n   By default it is expected that you have [zenoh-c] installed. If you want to install for [zenoh-pico] backend or for both (or to not specify any backend), please set `ZENOHCXX_ZENOHC` or `ZENOHCXX_ZENOHPICO` Cmake variables to`ON` or `OFF` accordingly. Notice that at least one of the backends is required for using the library and/or building tests and examples.\n\n   Use option `CMAKE_INSTALL_PREFIX` for specifying installation location. Without this parameter installation is performed to default system location `/usr/local` which requires root privileges.\n\n    ```bash\n    mkdir build \u0026\u0026 cd build\n    cmake .. -DCMAKE_INSTALL_PREFIX=~/.local # to configure only for zenoh-c backend\n    cmake .. -DZENOHCXX_ZENOHC=OFF -DZENOHCXX_ZENOHPICO=ON  -DCMAKE_INSTALL_PREFIX=~/.local # to configure  only for zenoh-pico backend\n    cmake .. -DZENOHCXX_ZENOHC=OFF -DZENOHCXX_ZENOHPICO=OFF  -DCMAKE_INSTALL_PREFIX=~/.local # to configure for none of the backends\n    cmake .. -DZENOHCXX_ZENOHPICO=ON  -DCMAKE_INSTALL_PREFIX=~/.local # to configure for both backends\n    cmake --install .\n    ```\n\n## Building and running tests\n\nBy default it is expected that you have [zenoh-c] installed. If you want to build and run tests for [zenoh-pico] backend or for both, please set `ZENOHCXX_ZENOHC` or `ZENOHCXX_ZENOHPICO` Cmake variables to`ON` or `OFF` accordingly.\n\nTo build tests run:\n\n```bash\nmkdir build \u0026\u0026 cd build\ncmake ..  -DCMAKE_INSTALL_PREFIX=~/.local # to build tests only for zenoh-c backend\ncmake .. -DZENOHCXX_ZENOHC=OFF -DZENOHCXX_ZENOHPICO=ON  -DCMAKE_INSTALL_PREFIX=~/.local # to build tests only for zenoh-pico backend\ncmake .. -DZENOHCXX_ZENOHPICO=ON  -DCMAKE_INSTALL_PREFIX=~/.local # to build tests for both backends\ncmake --build . --target tests\nctest\n```\n\nNotice that the output of `cmake ../zenoh-cpp` shows where [zenoh-c] and/or [zenoh-pico] the dependencies were found.\n\n## Building the Examples\n\nExamples are splitted into two subdirectories. Subdirectory `universal` contains [zenoh-cpp] examples buildable with both [zenoh-c] and [zenoh-pico] backends. The `zenohc` subdirectory contains examples with zenoh-c specific functionality.\n\nBy default it is expected that you have [zenoh-c] installed. If you want to build examples for [zenoh-pico] backend or for both, please set `ZENOHCXX_ZENOHC` or `ZENOHCXX_ZENOHPICO` Cmake variables to`ON` or `OFF` accordingly.\n\nTo build examples run:\n\n```bash\ncmake ..  -DCMAKE_INSTALL_PREFIX=~/.local # to build examples only for zenoh-c backend\ncmake .. -DZENOHCXX_ZENOHC=OFF -DZENOHCXX_ZENOHPICO=ON  -DCMAKE_INSTALL_PREFIX=~/.local # to build examples only for zenoh-pico backend\ncmake .. -DZENOHCXX_ZENOHPICO=ON  -DCMAKE_INSTALL_PREFIX=~/.local # to build examples for both backends\ncmake --build . --target examples\n```\n\nExamples are placed into `build/examples/zenohc` and `build/examples/zenohpico` directories.\n\n## Running the examples\n\nSee information about running examples [here](./examples/README.md).\n\nExamples of linking [zenoh-cpp] to an external project can be found [here](./examples/simple/Readme.md).\n\n## Library usage\n\nBelow are the steps to include [zenoh-cpp] into CMake project. See also [examples/simple](examples/simple) directory for short examples of CMakeLists.txt.\n\n- include [zenoh-c] or [zenoh-pico] into your CMake project **before** dependency on [zenoh-cpp] itself.\n  This is important as the library targets you need (`zenohcxx::zenohpico`, `zenohcxx::zenohc::lib`) are defined only if their backend library targets (`zenohpico::lib` and/or `zenohc::lib` are defined)\n\n- include [zenoh-cpp] using [find_package] CMake function:\n\n  ```cmake\n  find_package(zenohc) #if using zenoh-c backend\n  find_package(zenohpico) #if using zenoh-pico backend\n  find_package(zenohcxx)\n  ```\n\n- add dependency on zenoh-cpp to your project:\n\n  ```cmake\n  target_link_libraries(yourproject PUBLIC zenohcxx::zenohc) #if using zenoh-c backend\n  target_link_libraries(yourproject PUBLIC zenohcxx::zenohpico) #if using zenoh-pico backend\n  ```\n\n- include the [zenoh.hxx] header. All zenoh functionality is available under the namespace `zenoh`:\n\n  ```c++\n  #include \"zenoh.hxx\"\n  using namespace zenoh;\n  ```\n\n### Documentation\n\nThe documentation is on [zenoh-cpp.readthedocs.io].\nInstruction how to build documentation locally is at [docs/README.md].\n\n[rust-lang](https://www.rust-lang.org)\n[zenoh](https://github.com/eclipse-zenoh/zenoh)\n[zenoh-c](https://github.com/eclipse-zenoh/zenoh-c)\n[zenoh-cpp](https://github.com/eclipse-zenoh/zenoh-cpp)\n[zenoh-pico](https://github.com/eclipse-zenoh/zenoh-pico)\n[zenoh.hxx](https://github.com/eclipse-zenoh/zenoh-cpp/blob/main/include/zenoh.hxx)\n[add_subdirectory](https://cmake.org/cmake/help/latest/command/add_subdirectory.html)\n[find_package](https://cmake.org/cmake/help/latest/command/find_package.html)\n[FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html)\n[zenoh-cpp.readthedocs.io](https://zenoh-cpp.readthedocs.io)\n[docs/README.md](https://github.com/eclipse-zenoh/zenoh-cpp/blob/main/docs/README.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-zenoh%2Fzenoh-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-zenoh%2Fzenoh-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-zenoh%2Fzenoh-cpp/lists"}