{"id":13732188,"url":"https://github.com/chrberger/libcluon","last_synced_at":"2025-10-24T05:30:29.117Z","repository":{"id":49078514,"uuid":"114693072","full_name":"chrberger/libcluon","owner":"chrberger","description":"libcluon is a small and efficient, single-file and header-only library written in modern C++ to power microservices.","archived":false,"fork":false,"pushed_at":"2024-03-22T09:45:12.000Z","size":474324,"stargazers_count":101,"open_issues_count":4,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T23:41:19.729Z","etag":null,"topics":["aarch64","armhf","cpp","cpp14","freebsd","header-only","javascript","json","lcm","linux","msgpack","openbsd","osx","powerpc","protobuf","robotics","s390x","single-file","windows","x86-64"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrberger.png","metadata":{"files":{"readme":"README.md","changelog":"changelog","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-12-18T22:15:54.000Z","updated_at":"2024-11-28T05:51:29.000Z","dependencies_parsed_at":"2024-03-21T21:51:56.601Z","dependency_job_id":null,"html_url":"https://github.com/chrberger/libcluon","commit_stats":null,"previous_names":[],"tags_count":121,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrberger%2Flibcluon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrberger%2Flibcluon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrberger%2Flibcluon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrberger%2Flibcluon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrberger","download_url":"https://codeload.github.com/chrberger/libcluon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237915423,"owners_count":19386724,"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":["aarch64","armhf","cpp","cpp14","freebsd","header-only","javascript","json","lcm","linux","msgpack","openbsd","osx","powerpc","protobuf","robotics","s390x","single-file","windows","x86-64"],"created_at":"2024-08-03T02:01:48.705Z","updated_at":"2025-10-24T05:30:28.638Z","avatar_url":"https://github.com/chrberger.png","language":"C++","funding_links":[],"categories":["Networking"],"sub_categories":[],"readme":"# libcluon\n\n| Linux \u0026 OSX Build (TravisCI) | Win64 Build (AppVeyor) | Test Coverage | Coverity Analysis | CII Best Practices |\n| :--------------------------: | :--------------------: | :-----------: | :---------------: | :----------------: |\n| [![Build Status](https://travis-ci.org/chrberger/libcluon.svg?branch=master)](https://travis-ci.org/chrberger/libcluon) | [![Build status](https://ci.appveyor.com/api/projects/status/n33il43mb6ot5422/branch/master?svg=true)](https://ci.appveyor.com/project/chrberger/libcluon/branch/master) | [![codecov](https://codecov.io/gh/chrberger/libcluon/branch/master/graph/badge.svg)](https://codecov.io/gh/chrberger/libcluon) | [![Coverity Scan](https://scan.coverity.com/projects/14014/badge.svg)]() | [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1479/badge)](https://bestpractices.coreinfrastructure.org/projects/1479) |\n\n[![License](https://img.shields.io/badge/license-MPL--2-blue.svg)](https://raw.githubusercontent.com/chrberger/libcluon/master/LICENSE) [![API documentation](https://img.shields.io/badge/documentation-latest-blue.svg)](https://chrberger.github.io/libcluon/) [![Win (x86_64)](https://img.shields.io/badge/Win-x86__64%20(installer)-blue.svg\n)](https://dl.bintray.com/chrberger/libcluon/) [![Ubuntu (x86_64)](https://img.shields.io/badge/deb-x86__64-blue.svg\n)](https://launchpad.net/~chrberger/+archive/ubuntu/libcluon/+packages) [![Ubuntu (armhf)](https://img.shields.io/badge/deb-armhf-blue.svg\n)](https://launchpad.net/~chrberger/+archive/ubuntu/libcluon/+packages) [![Ubuntu (aarch64)](https://img.shields.io/badge/deb-aarch64-blue.svg\n)](https://launchpad.net/~chrberger/+archive/ubuntu/libcluon/+packages) [![Ubuntu (s390x)](https://img.shields.io/badge/deb-s390x-blue.svg\n)](https://launchpad.net/~chrberger/+archive/ubuntu/libcluon/+packages) [![Ubuntu (powerpc)](https://img.shields.io/badge/deb-powerpc-blue.svg\n)](https://launchpad.net/~chrberger/+archive/ubuntu/libcluon/+packages) [![Alpine (x86_64)](https://img.shields.io/badge/Alpine-x86__64-blue.svg\n)](https://github.com/chrberger/libcluon/blob/gh-pages/alpine/v3.7/x86_64/Dockerfile#L19) [![Alpine (armhf)](https://img.shields.io/badge/Alpine-armhf-blue.svg\n)](https://github.com/chrberger/libcluon/blob/gh-pages/alpine/v3.7/armhf/Dockerfile#L25) [![Alpine (aarch64)](https://img.shields.io/badge/Alpine-aarch64-blue.svg\n)](https://github.com/chrberger/libcluon/blob/gh-pages/alpine/v3.7/aarch64/Dockerfile#L25)\n\nlibcluon is a small single-file, header-only library written in modern C++ library to _glue_ microservices - in a _clever_ way - simply: cluon. Its name is inspired by gluon, an [elementary particle acting as exchange particle](https://en.wikipedia.org/wiki/Gluon).\n\nlibcluon is distributed as single-file, [header-only](https://github.com/chrberger/libcluon/tree/gh-pages/headeronly) library - just drop [cluon-complete.hpp](https://chrberger.github.io/libcluon/headeronly/cluon-complete.hpp) into your project, `#include \"cluon-complete.hpp\"`, and compile your project with a modern C++ compiler (C++14 or newer)\n\n_Say you want to quickly realize a distributed software system where individual software components exchange messages and you want to keep your project as *simple* and *clean* as possible - that's a typical use-case for libcluon._ [Getting Started Tutorial using an online C++ compiler](https://wandbox.org/permlink/3S1bSOaLakXfdWWZ).\n\n\n## Table of Contents\n* [Features](#features)\n* [Dependencies](#dependencies)\n* [Installation on Ubuntu 20.04 LTS](#installation-on-ubuntu-2004-lts)\n* [Installation on Ubuntu 18.04 LTS](#installation-on-ubuntu-1804-lts)\n* [Installation on Debian](#installation-on-debian)\n* [Installation on Alpine 3.13](#installation-on-alpine-313)\n* [Installation on Windows](#installation-on-windows)\n* [Build from sources on the example of Ubuntu 16.04 LTS](#build-from-sources-on-the-example-of-ubuntu-1604-lts)\n* [Tutorials](#tutorials--api-documentation)\n* [Contributing](#contributing)\n* [License](#license)\n\n\n## Features\n* Written in highly portable and high quality C++14\n* **Available as [header-only](https://github.com/chrberger/libcluon/tree/gh-pages/headeronly), single-file distribution - just drop [cluon-complete.hpp](https://chrberger.github.io/libcluon/headeronly/cluon-complete.hpp) into your project, `#include \"cluon-complete.hpp\"`, and compile your project with a modern C++ compiler (C++14 or newer)**\n* Message compiler produces fully self-contained messages that do only depend on C++14 - external libraries are not needed allowing easy embedding into existing projects\n* Native implementation of [Protobuf](https://developers.google.com/protocol-buffers/) for data serialization \u0026 deserialization: [Example](https://wandbox.org/permlink/rXayIZxXyVDt5Jgn)\n* Native implementation of [LCM](http://lcm-proj.github.io/type_specification.html)/[ZCM](http://zerocm.github.io/zcm/) for data serialization \u0026 deserialization: [Example](https://wandbox.org/permlink/ItJnZ3VVnZsqL28y)\n* Native implementation of [JSON](https://www.json.org/) for data serialization \u0026 deserialization: [Example](https://wandbox.org/permlink/qyvkWIzGZFiBnTvm)\n* Native implementation of [MsgPack](https://msgpack.org/) for data serialization \u0026 deserialization: [Example](https://wandbox.org/permlink/qFNxlA8zwZj2if0P)\n* libcluon natively available for JavaScript via [Emscripten](https://github.com/kripken/emscripten): [libcluon.js](https://github.com/chrberger/libcluon/releases/download/v0.0.140/libcluon.js)\n* Portable implementation of publish/subscribe communication (Linux, MacOSX, Windows): [Example](https://github.com/chrberger/libcluon/blob/master/libcluon/testsuites/TestUDPReceiver.cpp#L111)\n* Intermediate Data Representation (IDR) enables flexible message transformations at runtime; for example: Convert [Protobuf to JSON](https://github.com/chrberger/libcluon/blob/master/libcluon/testsuites/TestMyTestMessage1.cpp#L348) or convert [OD4 to JSON](https://github.com/chrberger/libcluon/blob/master/libcluon/tools/cluon-OD4toJSON.cpp) or convert [LCM to JSON](https://github.com/chrberger/libcluon/blob/master/libcluon/tools/cluon-LCMtoJSON.cpp) at runtime without generating any data structures beforehand\n* Message self-reflection to extract portable message specifications at runtime: [Examples](https://github.com/chrberger/libcluon/blob/master/libcluon/testsuites/TestToODVDVisitor.cpp#L32)\n* Message transformatiom into platform-independent CSV format: [Examples](https://github.com/chrberger/libcluon/blob/master/libcluon/testsuites/TestToCSVVisitor.cpp#L28)\n\n\n## Dependencies\nNo dependencies! All you need is a C++14-compliant compiler as the project ships the following dependencies as part of the source distribution:\n\n* [Unit Test Framework Catch2 v2.11](https://github.com/catchorg/Catch2/releases/tag/v2.11) - [![License: Boost Software License v1.0](https://img.shields.io/badge/License-Boost%20v1-blue.svg)](http://www.boost.org/LICENSE_1_0.txt) - [Source](https://github.com/chrberger/libcluon/tree/master/buildtools/xUnit)\n* [adishavit/argh v1.3.1](https://github.com/adishavit/argh/releases/tag/v1.3.1) - [![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) - [Source](https://github.com/chrberger/libcluon/tree/master/libcluon/thirdparty/argh)\n* [chrberger/stringtoolbox](https://github.com/chrberger/stringtoolbox) - [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) - [Source](https://github.com/chrberger/libcluon/tree/master/libcluon/thirdparty/cluon/stringtoolbox.hpp)\n* [kainjow/Mustache v4.1](https://github.com/kainjow/Mustache/releases/tag/v4.1) - [![License: Boost Software License v1.0](https://img.shields.io/badge/License-Boost%20v1-blue.svg)](http://www.boost.org/LICENSE_1_0.txt) - [Source](https://github.com/chrberger/libcluon/tree/master/libcluon/thirdparty/Mustache)\n* [thelink2012/any](https://github.com/thelink2012/any) - [![License: Boost Software License v1.0](https://img.shields.io/badge/License-Boost%20v1-blue.svg)](http://www.boost.org/LICENSE_1_0.txt) - [Source](https://github.com/chrberger/libcluon/tree/master/libcluon/thirdparty/cluon/any)\n* [yhirose/cpp-peglib v0.1.7](https://github.com/yhirose/cpp-peglib/releases/tag/v0.1.7) - [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) - [Source](https://github.com/chrberger/libcluon/tree/master/libcluon/thirdparty/cpp-peglib)\n\nAs part of our CI strategy thanks to TravisCI and AppVeyor, we are continuously building with:\n\n* Darwin 16.7.0 (x86_64)/AppleClang 9.0.0.9000038\n\n* FreeBSD 11.1 (x86_64)/GCC 6.4.0\n* NetBSD 8.0 (x86_64)/GCC 5.5.0\n* OpenBSD 6.3 (x86_64)/clang 5.0.1\n\n* Windows (x86_64)/MSVC 19.13.26129.0\n\n* Ubuntu 18.04 LTS (x86_64)/GCC 7.4.0\n* Ubuntu 18.04 LTS (x86_64)/clang 7.0.0\n\n* Ubuntu 16.04 LTS (x86_64)/GCC 5.4.0\n* Ubuntu 16.04 LTS (x86_64)/clang 7.0.0\n\n* Ubuntu 14.04 LTS (armhf)/clang 3.8.1\n\n* Ubuntu 14.04 LTS (x86_64)/GCC 8.0.1\n* Ubuntu 14.04 LTS (x86_64)/GCC 7.3.0\n* Ubuntu 14.04 LTS (x86_64)/GCC 6.4.0\n* Ubuntu 14.04 LTS (x86_64)/GCC 5.5.0\n\n* Ubuntu 14.04 LTS (x86_64)/clang 6.0.1\n* Ubuntu 14.04 LTS (x86_64)/clang 5.0.2\n* Ubuntu 14.04 LTS (x86_64)/clang 5.0.0\n* Ubuntu 14.04 LTS (x86_64)/clang 4.0.1\n* Ubuntu 14.04 LTS (x86_64)/clang 3.9.1\n* Ubuntu 14.04 LTS (x86_64)/clang 3.8.0\n\n\n## Installation\n### Installation as single-file, header-only library\n`libcluon` is provided as [header-only](https://github.com/chrberger/libcluon/tree/gh-pages/headeronly), single-file library as well - just drop [cluon-complete.hpp](https://chrberger.github.io/libcluon/headeronly/cluon-complete.hpp) into your project, `#include \"cluon-complete.hpp\"` where you want to use libcluon, and compile your project with a modern C++ compiler (C++14 or newer).\n\n### Installation on Ubuntu 20.04 LTS\nWe are providing pre-compiled binaries for Ubuntu 20.04 LTS (Focal Fossa) via Ubuntu's Launchpad for `amd64`, `i386`, `armfh`, and `arm64`; simply add the following PPA to your sources list:\n\n```\nsudo add-apt-repository ppa:chrberger/libcluon\n```\n\nAfterwards, update your package database and install `libcluon`:\n\n```\nsudo apt-get update\nsudo apt-get install libcluon\n```\n\n### Installation on Ubuntu 18.04 LTS\nWe are providing pre-compiled binaries for Ubuntu 18.04 LTS (Bionic Beaver) via Ubuntu's Launchpad for `amd64`, `i386`, `armfh`, and `arm64`; simply add the following PPA to your sources list:\n\n```\nsudo add-apt-repository ppa:chrberger/libcluon\n```\n\nAfterwards, update your package database and install `libcluon`:\n\n```\nsudo apt-get update\nsudo apt-get install libcluon\n```\n\n### Installation on Debian\nTo use `libcluon` on Debian, you need to add the repository key first:\n\n```\nsudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8EA63C9470BA0E595B75BBA2A92E492AC0B8C7EC\n```\n\nAfterwards, install `add-apt-repository` and its dependencies:\n\n```\nsudo apt install dirmngr software-properties-common\n```\n\nThen, you can add the `libcluon` repository:\n```\nsudo add-apt-repository ppa:chrberger/libcluon\n```\n\nNow, you can finally install `libcluon`:\n```\nsudo apt update \u0026\u0026 sudo apt install libcluon\n```\n\n### Installation on Alpine 3.13\nWe are providing pre-compiled binaries for Alpine 3.13 for `x86_64`, `armfh`, and `aarch64`; simply install the pre-compile `.apk` package as follows:\n\n```\napk add libcluon --no-cache --repository https://chrberger.github.io/libcluon/alpine/v3.13 --allow-untrusted\n```\n\n### Installation on Windows\nWe are providing pre-compiled binaries including debug symbols for Windows 64 via BinTray here: https://bintray.com/chrberger/libcluon/libcluon-win64-debug#files/\n\n\n## Build from sources on the example of Ubuntu 16.04 LTS\nTo compile `libcluon` from sources on an Ubuntu 16.04 LTS (Xenial Xerus) system, you need to have `build-essential`, `cmake`, and `git` installed:\n\n```\nsudo apt-get install build-essential git cmake\n```\n\nAfterwards, simply clone our Git repository:\n\n```\ngit clone https://github.com/chrberger/libcluon.git\n```\n\nAs an alternative, you can download our latest source release from here: https://github.com/chrberger/libcluon/releases/latest\n\nChange to your working copy and create a build folder:\n\n```\ncd libcluon\nmkdir build\ncd build\n```\n\nNext, run `cmake` to create the necessary build files:\n\n```\ncmake ../libcluon\n```\n\nFinally, compile and install the software:\n\n```\nmake\nmake test\nmake install\n```\n\n## Tutorials \u0026 API Documentation\n* [API Documentation](https://chrberger.github.io/libcluon/)\n* [Tutorial: \"Getting Started\" explaining how to exchange messages between distributed applications (using an online C++ compiler)](https://wandbox.org/permlink/3S1bSOaLakXfdWWZ)\n* [Tutorial: Sending \u0026 receiving data via UDP (using an online C++ compiler)](https://wandbox.org/permlink/3bWexUDo6OqxDCBE)\n* [Tutorial: Creating a TCP server to send \u0026 receive data (using an online C++ compiler)](https://wandbox.org/permlink/ZumnWxgXN9QUNHmD)\n* [Tutorial: Exchanging data via shared memory with wait \u0026 notify (using an online C++ compiler)](https://wandbox.org/permlink/m7bmtpOS0dynGJlP)\n* [Tutorial: Timestamping (using an online C++ compiler)](https://wandbox.org/permlink/aigGxE7xjU09X3qW)\n* [Tutorial: Encoding \u0026 decoding using libcluon's native Protobuf (using an online C++ compiler)](https://wandbox.org/permlink/rXayIZxXyVDt5Jgn)\n* [Tutorial: Encoding \u0026 decoding using libcluon's native LCM (using an online C++ compiler)](https://wandbox.org/permlink/ItJnZ3VVnZsqL28y)\n* [Tutorial: Encoding \u0026 decoding using libcluon's native MsgPack (using an online C++ compiler)](https://wandbox.org/permlink/qFNxlA8zwZj2if0P)\n* [Tutorial: Encoding using libcluon's native JSON (using an online C++ compiler)](https://wandbox.org/permlink/qyvkWIzGZFiBnTvm)\n* [Tutorial: Encoding using libcluon's native CSV (using an online C++ compiler)](https://wandbox.org/permlink/APD3G7An9Ebh4eio)\n* [Tutorial: Encoding \u0026 decoding with dynamic message specifications using libcluon's native Protobuf (using an online C++ compiler)](https://wandbox.org/permlink/uR2NZwnYZkTwmDac)\n* [Tutorial: Turn a JSON string into Protobuf with dynamic message specifications (using an online C++ compiler)](https://wandbox.org/permlink/2SKYkHnVrNwoSJfK)\n* [Tutorial: Using libcluon to realize an application communicating between JavaScript and C++](https://github.com/chrberger/cluon-javascript)\n\n\n## Contributing\nWe are happy to receive your PRs to accelerate libcluon's development; before contributing, please take a look at the [Contribution Documents](CONTRIBUTING.md).\n\n\n## License\n* This project is released under the terms of the Mozilla Public License 2.0 - [![License: MPL-2.0](https://img.shields.io/badge/license-MPL--2-blue.svg)](http://mozilla.org/MPL/2.0/) - [FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/)\n* Commercial support is available at [libcluon@christianberger.net](mailto:libcluon@christianberger.net)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrberger%2Flibcluon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrberger%2Flibcluon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrberger%2Flibcluon/lists"}