blockspacer / libcommon

Library of reusable C++ code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libcommon

libcommon is a collection of reusable C++ code shared by many C++ projects at CM4all GmbH.

The project was created when code duplication between C++ projects got out of hand. Commonly used code was moved into this library, instead of keeping several copies in sync.

The library is meant to be included in other projects as a git submodule. It is a lively and volatile project, which makes it hard to turn it into a shared library. Retaining ABI stability (which is very difficult with C++ anyway) would be too hard at this stage, and not worthwile.

Building libcommon

You need:

To build it, type:

meson . build
ninja -C build

That produces several static libraries.

Contents

Each directory below src contains a sub-library:

  • util: generic utilities
  • co: C++20 Coroutines
  • time: dealing with date and time
  • http: HTTP protocol definitions and helpers
  • adata: data structures using our pool allocator
  • system: operating system utilities
  • io: file I/O utilities
  • io/uring: liburing C++ wrapper
  • json: standalone boost::json
  • net: networking/socket utilities
  • event: a non-blocking I/O event loop
  • lib: C++ wrappers or additional utilities for various external libraries.
  • lua: Lua C++ wrappers
  • pg: libpq C++ wrappers
  • translation: implementation of the CM4all translation protocol
  • spawn: a process spawner
  • stock: manage stocks of reusable objects (e.g. for connection pooling)

These directories contain C++ wrappers or additional utilities for external libraries:

  • lib/curl: libcurl C++ wrappers
  • lib/dbus: libdbus C++ wrappers
  • lib/fmt: libfmt helpers
  • lib/mariadb: C++ wrappers for the MariaDB client library
  • lib/openssl: OpenSSL C++ wrappers
  • lib/pcre: PCRE C++ wrappers
  • lib/sodium: libsodium C++ wrappers
  • lib/zlib: zlib C++ wrappers

About

Library of reusable C++ code

License:BSD 2-Clause "Simplified" License


Languages

Language:C++ 97.6%Language:Meson 2.0%Language:C 0.4%