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.37
- Boost
- libcurl
- 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::jsonnet: networking/socket utilitiesevent: a non-blocking I/O event looplua: Lua C++ wrapperscurl: libcurl C++ wrapperspcre: PCRE C++ wrapperspg: libpq C++ wrappersodbus: libdbus C++ wrapperssodium: libsodium C++ wrappersssl: OpenSSL C++ wrapperszlib: zlib C++ wrapperstranslation: implementation of the CM4all translation protocolspawn: a process spawnerstock: manage stocks of reusable objects (e.g. for connection pooling)