A set of modern C++20 libraries for writing interactive Web-Services.
The main goal of these libraries is to remove the need to write boilerplate code. Using a declarative style, an engineer can define C++ classes and their serializable members, then send and receive them over the network with no manual serialization code.
Mug | Internal Documentation A configurable HTTP server application that dynamically loads shared-library plugins at runtime. Define your REST endpoints in plugins and Mug handles the server lifecycle, configuration, and hot-reloading.
ThorsMug | Internal Documentation
The plugin interface for Mug. Implement MugPlugin to register HTTP route handlers that are dynamically loaded and unloaded by the Mug server.
ThorsSlack | Internal Documentation Type-safe C++ API for the Slack platform. Supports the Slack REST API, webhooks, event callbacks, slash commands, and Block Kit – all with automatic JSON serialization via ThorsSerializer.
NisseServer | Internal Documentation
An event-driven, coroutine-based C++ server framework. Provides non-blocking async I/O over TCP and TLS sockets with a synchronous-looking API powered by boost::coroutines2 and libEvent.
NisseHTTP | Internal Documentation HTTP/1.x layer built on NisseServer. Provides request parsing, response generation, URL routing with path captures, chunked transfer encoding, and client-side HTTP utilities.
ThorsSocket | Internal Documentation
Unified C++ socket library for files, pipes, TCP sockets, and TLS sockets. Exposes all transport types through std::iostream with optional non-blocking I/O and coroutine yield support.
ThorsCrypto | Internal Documentation Header-only cryptographic primitives: MD5, SHA-1, SHA-256 hashing, HMAC, PBKDF2 key derivation, SCRAM authentication, Base64 encoding/decoding, and CRC32 checksums.
ThorsSerializer | Internal Documentation
Declarative C++ serialization for JSON, YAML, and BSON. Declare which members to serialize with a single macro and use operator<< / operator>> for automatic conversion.
ThorsMongo | Internal Documentation Type-safe MongoDB client for C++20. Builds BSON commands via ThorsSerializer, sends them over ThorsSocket, and exposes results as normal C++ objects and cursor-backed ranges.
ThorsLogging | Internal Documentation
Leveled logging macros with optional exception throwing. Wraps loguru for full builds or falls back to std::cerr in header-only mode.
ThorsIOUtil | Internal Documentation
Type-safe printf-style formatting through std::ostream. Validates format specifiers against C++ argument types at runtime.
Requires a C++20 compatible compiler.
brew install thors-anvil
git clone --single-branch --branch header-only https://github.com/Loki-Astari/ThorsAnvil.git
Add the cloned directory to your include path.
git clone https://github.com/Loki-Astari/ThorsAnvil.git
cd ThorsAnvil
./configure
make
sudo make install
# Basic compilation
g++ -std=c++20 myfile.cpp -lThorSerialize -lThorsLogging
# With YAML support
g++ -std=c++20 myfile.cpp -lThorSerialize -lThorsLogging -lyaml
# Windows: add /Zc:preprocessor for conforming preprocessor