[Summary]
StormByte Base is the C++26 foundation of the StormByte suite.
Every other module links this library.
This repository is not Buffer, Config, Crypto, Database, Logger, Multimedia, Network or System — those live in their own repos and depend on Base.
Public headers under StormByte/ cover exceptions, Expected, little-endian Serializable, strings, paths, UUID v4, bitmasks, clonable types, ThreadLock, and StormByte::Type concepts.
If you landed here from a release link and have not read the tree:
- What this module is, how to build it, and short examples: README.md
- License: GNU Lesser General Public License version 3 or later, LICENSE
Initial public release of StormByte Base.
Added
- Exception hierarchy with DLL-safe
const char*storage andstd::formatsupport - Expected<T, E> on
std::expectedwith reference support and shared error ownership (Unexpectedhelpers) - Serializable template
- Trivially copyable types, STL containers,
std::pairandstd::optional Detail::Codecforstd::string,std::wstring,std::u16stringandstd::u32string- Zero-copy input via
std::span<const std::byte> - Little-endian on the wire
- Trivially copyable types, STL containers,
- Base64 encode / decode (standard alphabet, whitespace-tolerant decoder)
- Bitmask CRTP for unsigned flag enums (
|,&,^,~,Add,Remove,Has,HasAny,HasNone) - Clonable for smart-pointer clone / move (
std::shared_ptr/std::unique_ptr) - ThreadLock — owner-tracked lock; the owner may reenter;
Unlockfrom a non-owner is a no-op - String utilities
- Case conversion (
ToLower/ToUpper) - Splitting (
Explode,Split) - Human-readable number and byte-size formatting
- UTF-8 ↔ wide string conversion
- Byte vector ↔ string conversion
- Whitespace removal, newline sanitization, integer detection
- Case conversion (
- System utilities
TempFileName()CurrentPath()(process cwd)ExecutablePath()(directory of the running executable)Sleep()for anystd::chrono::duration
- UUID generation (
GenerateUUIDv4()— RFC 4122 version 4) - Type concepts under
StormByte::Type(String,Container,Optional,Pair, enums, …) - Platform macros (
WINDOWS,LINUX,MACOS,UNIX,BIT32/BIT64) - Compiler macros:
CLANG(including clang-cl),GCC,MSVC(MSVC only; not clang-cl) - Visibility macros for shared builds
- Unit tests, including serialization robustness
Changed
- Serialization size fields on the wire are
std::uint64_t(8 bytes). 32-bit and 64-bit hosts interchange. System::CurrentPath()is the process cwd. The old meaning isExecutablePath().
Fixed
Base64Decodedocumentation matches the lenient decoder (whitespace ignored, stops at first=, padding accepted but not strictly checked).CurrentPath()documentation matches the implementation.
Notes
- First stable release of StormByte Base.
- The binary serialization layout is stable.
- Needs a C++26 compiler and CMake ≥ 3.28.
- Foundation for Buffer, Config, Crypto, Database, Logger, Multimedia, Network and System.