diff --git a/README.md b/README.md index 968a2512c..e043091d9 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,27 @@ # Eclipse zenoh C Client API -## Building +[Eclipse zenoh](http://zenoh.io) is an extremely efficient and fault-tolerant [Named Data Networking](http://named-data.net) (NDN) protocol +that is able to scale down to extremely constrainded devices and networks. + +The C API is for pure clients, in other terms does not support peer-to-peer communication, can be easily tested against a zenoh router running in a Docker container (see https://github.com/eclipse-zenoh/zenoh#how-to-test-it). + +------------------------------- +## How to install it + +The Eclipse zenoh-c library is available as **Debian** or **RPM** packages in the [Eclipse zenoh download area](https://download.eclipse.org/zenoh/zenoh-c/). +Those packages are built using manylinux2010 x86-32 and x86-64 to be compatible with most of the Linux platforms. +There are 2 kind of packages: + + - **libzenohc**: only contains the library file (.so) + - **libzenohc-dev**: contains the zenoh-c header files for development. Depends on *libzenohc* package + +For other platforms, you will need to clone and build the sources. + +WARNING: Note that zenoh-c has not been ported on Windows yet! + +------------------------------- +## How to build it To build the **zenoh-c** client API you need to ensure that [cmake](https://cmake.org) is available on your platform -- if not please install it. Once the [cmake](https://cmake.org) dependency is satisfied, just do the following for **CMake** version 3 and higher: @@ -19,10 +39,14 @@ Once the [cmake](https://cmake.org) dependency is satisfied, just do the followi ```bash $ cd /path/to/zenoh-c - $ mkdir build - $ cd build - $ cmake -DCMAKE_BUILD_TYPE=Release .. - $ make + $ make + $ make install # on linux use **sudo** + ``` + +If you want to build with debug symbols set the `BUILD_TYPE=Debug`environment variable before to run make: + ```bash + $ cd /path/to/zenoh-c + $ BUILD_TYPE=Debug make $ make install # on linux use **sudo** ``` @@ -37,24 +61,20 @@ For those that still have **CMake** version 2.8, do the following commands: $ make install # on linux use **sudo** ``` -If you want to build with debug symbols configure with the option -DCMAKE_BUILD_TYPE=Debug. - ## Running the Examples -The simplest way to run some of the example is to get a prebuilt instance of the **zenoh** network -router at [http://github.com/atolab/atobin](http://github.com/atolab/atobin) and then to run the -examples on your machine. +The simplest way to run some of the example is to get a Docker image of the **zenoh** network router (see https://github.com/eclipse-zenoh/zenoh#how-to-test-it) and then to run the examples on your machine. ### Starting the zenoh Network Service -Assuming you've downloaded the **zenoh** network service on the current directory, then simply do: +Assuming you've pulled the Docker image of the **zenoh** network service, then simply do: ```bash -$ ./zenohd +$ docker run --init -p 7447:7447/tcp -p 7447:7447/udp -p 8000:8000/tcp adlinktech/eclipse-zenoh:latest ``` To see the zenoh manual page, simply do: ```bash -$ ./zenohd --help +$ docker run --init -p 7447:7447/tcp -p 7447:7447/udp -p 8000:8000/tcp adlinktech/eclipse-zenoh:latest ```