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.
You need:
- a C++20 compiler (GCC or clang)
- meson 0.56
- Boost
- libcurl
- libfmt
- libpq
- libsystemd
- libdbus
- libcap
- libseccomp
- liburing
- libwas
- OpenSSL
- LuaJit
- PCRE
To build it, type:
meson . build ninja -C build
That produces several static libraries.
Each directory below src
contains a sub-library:
util
: generic utilitiesco
: C++20 Coroutinestime
: dealing with date and timehttp
: HTTP protocol definitions and helpersadata
: data structures using our pool allocatorsystem
: operating system utilitiesio
: file I/O utilitiesio/uring
: liburing C++ wrapperjson
: standaloneboost::json
net
: networking/socket utilitiesevent
: a non-blocking I/O event looplib
: C++ wrappers or additional utilities for various external libraries.lua
: Lua C++ wrapperspg
: libpq C++ wrapperstranslation
: implementation of the CM4all translation protocolspawn
: a process spawnerstock
: manage stocks of reusable objects (e.g. for connection pooling)
These directories contain C++ wrappers or additional utilities for external libraries: