All Projects → eclipse-zenoh → zenoh-c

eclipse-zenoh / zenoh-c

Licence: other
zenoh client library written in C and targeting micro-controllers.

Programming Languages

rust
11053 projects
c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to zenoh-c

zenoh-plugin-dds
A zenoh plug-in that allows to transparently route DDS data. This plugin can be used by DDS applications, such as ROS2 robotic applications and others, to leverage the zenoh for geographical routing or for better scaling discovery.
Stars: ✭ 60 (+114.29%)
Mutual labels:  ros2, edge-computing
Mainflux
Industrial IoT Messaging and Device Management Platform
Stars: ✭ 1,341 (+4689.29%)
Mutual labels:  messaging, edge-computing
Zenoh
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.
Stars: ✭ 182 (+550%)
Mutual labels:  messaging, edge-computing
simplex-chat
SimpleX - the first messaging platform operating without user identifiers of any kind - 100% private by design! iOS and Android apps are released 📱!
Stars: ✭ 1,975 (+6953.57%)
Mutual labels:  messaging
MicrosoftCloudWorkshop-Asia
Microsoft Cloud Workshop Asia for Intelligent Cloud / Intelligent Edge
Stars: ✭ 20 (-28.57%)
Mutual labels:  edge-computing
GAPITA
An anonymous and random chat messaging for talking to strangers! (Using SignalR C# and TypeScript)
Stars: ✭ 55 (+96.43%)
Mutual labels:  messaging
amqv7-workshop
No description or website provided.
Stars: ✭ 22 (-21.43%)
Mutual labels:  messaging
slam gmapping
Slam Gmapping for ROS2
Stars: ✭ 56 (+100%)
Mutual labels:  ros2
Server
FerrisChat's Server
Stars: ✭ 21 (-25%)
Mutual labels:  messaging
pcl localization ros2
ROS2 package of 3D LIDAR-based Localization using PCL (Not SLAM)
Stars: ✭ 74 (+164.29%)
Mutual labels:  ros2
server
即时通讯(IM)系统
Stars: ✭ 6,896 (+24528.57%)
Mutual labels:  messaging
minority
Ethereum 2.0 node multiplexer between consensus and execution
Stars: ✭ 94 (+235.71%)
Mutual labels:  messaging
horse-messaging
Open Source Messaging Framework. Queues, Channels, Events, Transactions, Distributed Cache
Stars: ✭ 65 (+132.14%)
Mutual labels:  messaging
docker
Docker-related material to setup, configure and develop with micro-ROS hardware.
Stars: ✭ 32 (+14.29%)
Mutual labels:  ros2
rmw email
ROS 2 over email: a middleware implementation
Stars: ✭ 40 (+42.86%)
Mutual labels:  ros2
postee
Simple message routing system that receives input messages through a webhook interface and can enforce actions using predefined outputs via integrations.
Stars: ✭ 160 (+471.43%)
Mutual labels:  messaging
prosody-filer
Golang mod_http_upload_external server for Prosody and Ejabberd
Stars: ✭ 41 (+46.43%)
Mutual labels:  messaging
faas-sim
A framework for trace-driven simulation of serverless Function-as-a-Service platforms
Stars: ✭ 33 (+17.86%)
Mutual labels:  edge-computing
go-nats-examples
Single repository for go-nats example code. This includes all documentation examples and any common message pattern examples.
Stars: ✭ 99 (+253.57%)
Mutual labels:  messaging
intruder-detector-python
Build an application that alerts you when someone enters a restricted area. Learn how to use models for multiclass object detection.
Stars: ✭ 16 (-42.86%)
Mutual labels:  edge-computing

CI Documentation Status Discussion Discord License License

Eclipse zenoh C Client API

Eclipse zenoh is an extremely efficient and fault-tolerant Named Data Networking (NDN) protocol that is able to scale down to extremely constrainded devices and networks.

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


How to build it

  1. Make sure that rust is available on your platform:

-- Ubuntu --

$ sudo apt-get install rustc

-- MacOS --

$ brew install rust
  1. Clone the source with git:

    git clone https://github.com/eclipse-zenoh/zenoh-c.git
    cd rust
  1. Build and install:
$ cd /path/to/zenoh-c
$ mkdir -p build && cd build 
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ cmake --build .
$ cmake --build . --target install # on linux use **sudo**

You may alternatively use -DCMAKE_BUILD_TYPE=RelWithDebInfo if you wish to keep the debug symbols.

Note that the install target is only available for Release and RelWithDebInfo builds.
CMake also offers the Debug build type, which we do not allow as an install target since you may suffer a significant performance hit if accidentally using this one.
Finally, CMake typicall offers a MinSizeRel build type. While we do not prevent you from using it, note that it is strictly equivalent to running a Release build.

Building the Examples

$ cd /path/to/zenoh-c
$ mkdir -p build && cd build #
$ cmake -DCMAKE_BUILD_TYPE=Release .. # If Ninja is installed on your system, adding `-GNinja` to this command can greatly speed up the build time
$ cmake --build . --target examples

You may also use --target <example_name> if you wish to only build a specific example.

All build artifacts will be in the /path/to/zenoh-c/target/release directory.

Running the Examples

Basic Pub/Sub Example

$ ./target/release/examples/z_sub
$ ./target/release/examples/z_pub

Queryable and Query Example

$ ./target/release/examples/z_queryable
$ ./target/release/examples/z_get

Running the Throughput Examples

$ ./target/release/examples/z_sub_thgr
$ ./target/release/examples/z_pub_thgr

API conventions

Many of the types exposed by the zenoh-c API are types for which destruction is necessary. To help you spot these types, we named them with the convention that any destructible type must start by z_owned.

For maximum performance, we try to make as few copies as possible. Sometimes, this implies moving data that you z_owned. Any function that takes a non-const pointer to a z_owned type will perform its destruction. To make this pattern more obvious, we encourage you to use the z_move macro instead of a simple & to create these pointers. Rest assured that all z_owned types are double-free safe, and that you may check whether any z_owned_X_t typed value is still valid by using z_X_check(&val), or the z_check(val) macro if you're using C11.

We hope this convention will help you streamline your memory-safe usage of zenoh, as following it should make looking for leaks trivial: simply search for paths where a value of a z_owned type hasn't been passed to a function using z_move.

Functions that simply need to borrow your data will instead take values of the associated z_X_t type. You may construct them using z_X_loan(&val) (or the z_loan(val) generic macro with C11).

Note that some z_X_t typed values can be constructed without needing to z_borrow their owned variants. This allows you to reduce the amount of copies realized in your program.

The examples have been written with C11 in mind, using the conventions we encourage you to follow.

Finally, we strongly advise that you refrain from using structure field that starts with _:

  • We try to maintain a common API between zenoh-c and zenoh-pico, such that porting code from one to the other is, ideally, trivial. However, some types must have distinct representations in either library, meaning that using these representations explicitly will get you in trouble when porting.
  • We reserve the right to change the memory layout of any type which has _-prefixed fields, so trying to use them might cause your code to break on updates.

Logging

By default, zenoh-c enables Zenoh's logging library upon using the z_open or z_scout functions. This behaviour can be disabled by adding -DDISABLE_LOGGER_AUTOINIT:bool=true to the cmake configuration command. The logger may then be manually re-enabled with the zc_init_logger function.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].