The repo shows how to build zenoh-cpp program with zenoh-c or zenoh-pico.
You have two options for providing the necessary Zenoh dependencies:
If you are on Ubuntu, you can install the pre-built libraries directly:
sudo apt update
sudo apt install libzenohcpp-dev libzenohc-dev libzenohpico-devOnce installed, you can simply build the examples:
just examples- Get submodule
just prepare- Build all the dependencies
just libOnce built, you can simply build the examples:
just examples- Using zenoh-c
# Run router
./build/zenoh_router "[\"tcp/localhost:8888\"]"
# Run subscriber
./build/zenoh_subscriber "[\"tcp/localhost:8888\"]"
# Run get
./build/zenoh_get "[\"tcp/localhost:8888\"]"
# Run put
./build/zenoh_put "[\"tcp/localhost:8888\"]"
# Router loads REST plugin by default. You can curl the information
curl http://localhost:8000/**- Using zenoh-cpp
# Run router
./build/zenoh_router
# Run put
## with zenoh-c backened
./build/zenoh_put_cpp_zc
## with zenoh-pico backend
./build/zenoh_put_cpp_zpicoTo use plugins in router mode, note that:
- The plugins and
zenoh-cshould be consistent, including Zenoh version and build features. - The feature
pluginsshould be enabled while buildingzenoh-c. - The feature
shared-memoryshould be enabled while building plugins, sincezenoh-cneeds this.