A small, lightweight UUID (Universally Unique Identifier) library for use in my C++ engine.
This library provides functionality for generating and handling UUIDs in a simple and portable way. It is designed to be minimal, cross-platform, and easily integrable into any C++ project.
Generate random UUIDs (version 4)
Parse and stringify UUIDs
Cross-platform support (Windows, Linux, macOS)
No external dependencies (except libuuid on Linux)
#include "uuid.h"
MauUUID::UUID id{ }
std::string str{ id.Str() };
auto parsed{ MauUUID::UUID::FromString(str) };
assert(parsed == id);
This library uses CMake for building. Example:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildcmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DMAU_UUID_BUILD_TESTS=ON
cmake --build build
cd build
ctest --output-on-failureOr set the option to OFF when adding the project in your cmake file to disable tests.