A C++17 cross-platform single-header library for generating and manipulating UUIDs (Universally Unique Identifiers).
stduuid is a C++17 library that implements UUID (Universally Unique Identifier) generation and manipulation. It provides a complete solution for creating, parsing, and comparing 128-bit identifiers that are essential for distributed systems, database keys, and object identification. The library follows RFC 4122 and the C++ standard proposal P0959 for UUID handling.
C++ developers working on cross-platform applications that require unique identifier generation, particularly those building distributed systems, databases, or middleware components.
Developers choose stduuid because it's a single-header, dependency-light implementation that's both standards-compliant and practical. It offers multiple UUID generation methods, seamless STL integration, and works consistently across all major platforms without requiring external dependencies.
A C++17 cross-platform implementation for UUIDs
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Easy integration without complex build systems; just include the header file, as highlighted in the library overview for minimal setup.
Works uniformly on Windows, Linux, and macOS, with generators like uuid_system_generator using OS-specific APIs when enabled via macros.
Supports random (version 4), name-based (version 5), and optional system-based UUIDs, offering flexibility for different use cases as described in the generators table.
Provides std::hash and std::swap specializations, allowing UUIDs to be used directly in unordered containers and with standard algorithms, demonstrated in examples.
For C++17 builds, requires the Microsoft Guidelines Support Library for span implementation, adding an external dependency that must be managed, as noted in the dependencies section.
Time-based UUID generator is marked as experimental and not for production, and system generator requires a macro (UUID_SYSTEM_GENERATOR) to be defined, limiting out-of-the-box functionality.
Relies on std::random_device which can be pseudo-random on some platforms like MinGW, potentially affecting UUID uniqueness, as warned in the 'Random uuids' section.