Releases: StormByte-Suite/StormByte
Release list
Version 2.0.0
[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, Size, 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
- Since 2.0.0 license changed: original source in this repository is dual-licensed, LGPL v3 or later or a commercial license from the copyright holder. The grant does not cover other StormByte modules or
thirdparty/. LICENSE
Added
- Safe::String / Safe::WString — UTF-8 and wide owned text integrated from StormByte-String into Base, with range, lookup, case conversion and serialization support. Views are copied when retained;
Bytes()exposes a non-owning C pointer. Explicit construction fromSafe::CString/Safe::WCStringremains available, withStringTests/WStringTests. - Telemetry and Clock — base session telemetry (
Telemetry) with pureoperator Safe::Stringand a protected named clock drawer (Clock) backed by a thread-safe PIMPL store (Safe::Unique<Store>). Leaves derive and add their own domain metrics and counters;Clockprovides a lightweight stopwatch measuring intervals, count, cumulative time, and mean duration. Covered byTelemetryTests. STORMBYTE_PUBLIC_TYPE— invisibility.h. Default visibility on ELF / Mach-O, empty on Windows. Put on header-only types (templates included) whosetypeinfoand vtable every module emits, sotypeid/dynamic_castagree across DLLs (on ELF the loader also merges the copies) even when a consumer builds with-fvisibility=hidden. Windows needs nothing: MSVC compares RTTI by name and implicitly exports the base specializations of an exported class.STORMBYTE_FORCE_INLINE— inplatform.h.inlineplus__forceinlineoralways_inline, so the body is emitted in the caller.inlinealone is only a hint.- BinaryData — owned contiguous sequence of
std::byte, safe to use across a DLL boundary. Same kind of API asstd::vector<std::byte>(iterators,<algorithm>,std::ranges,std::span, insert / erase / assign /append/emplace_back/operator+=). Lengths and indices useStormByte::ByteSize. Storage lives on Base's heap; the public type is notstd::vector<std::byte>.at()throwsOutOfBoundsError. Construct fromspan, pointer+ByteSize, range, initializer list,string_view, and a caller-ownedstd::vector<std::byte>(lvalue copies and leaves the vector; rvalue copies onto Base's heap then clears the vector — looks like a move, not a heap steal). Convert out with implicitspanandexplicit operator std::vector<std::byte>(const&copies and leaves*this;&&copies onto the caller CRT then clears*this).append(BinaryData&&)/operator+=(BinaryData&&)are a real same-heap move when*thisis empty. Compare equal / unequal / three-way with anotherBinaryDataand withstd::span<const std::byte>(both operand orders).HexDump()andHexDump(Size columns)return aSafe::String: 8-digit offset, hex row, ASCII (non-printable as.).columnsis a row width, not a byte length.0prints every byte on one line. DefaultHexDump()is 16 columns.Type::Container/Type::Sized/Type::HasPushBack/Type::ByteInputRangematch;Type::Stringdoes not.Serializable<BinaryData>uses the container path (same wire asstd::vector<std::byte>:uint64LE count + payload). Covered byBinaryDataTestsandSerializationTests. - CString — owned NUL-terminated buffer, safe to use across a DLL boundary. Not a
std::string. Copy, move,Reset,swap,Length(StormByte::Size), observeroperator[](indices[0, Length()];Length()is the trailing NUL; null or pastLength()is undefined andasserts when assertions are on), explicitoperator bool(non-null pointer;""is valid empty text), explicitconst char*(same lifetime asstd::string::c_str()), explicitstd::string_view(empty view when null;[0, Length()); same lifetime), implicitstd::string,operator<<, content==/!=/<=>, andstd::hash. Construct fromconst char*(null stays null),std::string_viewandconst std::string&(copy onto Base's heap, not a steal; empty yields"", not null). Covered byCStringTests. - WCString — wide counterpart of
CString(wchar_t/std::wstring/std::wstring_view/std::wostream). Same comparison, hash, subscript and lifetime rules asstd::wstring::c_str().Length()isStormByte::Size. Construct fromconst wchar_t*(null stays null),std::wstring_viewandconst std::wstring&(copy onto Base's heap; empty yieldsL""). Covered byWCStringTests. - Error —
Domain,Category,Code(Success,Unknown) andFault. Modules specializeDomainfor their enums;make_error_codelives next to the enum so ADL feedsstd::error_code. Category singletons stay in the module.cxx.Faultholds the code and aSafe::String. Not thrown. Covered byErrorTests. - Shared —
StormByte::Safe::Shared, complementsstd::shared_ptr(StormByte/safe/pointers.hxx). It does not replace it. Exact type:Safe::Heap::MakeShared. Derived type:Shared<Base>::MakePointer<Derived>(the deleter still destroys the derived object). Daily operations matchstd::shared_ptr(copy,reset,swap, compare,use_count,owner_before). No constructor from a raw pointer or fromstd::shared_ptr, and norelease. Converts implicitly tostd::shared_ptr<T>(same control block, deleter stays Base). No conversion back.StaticPointerCast,DynamicPointerCast,ConstPointerCastandReinterpretPointerCastkeep that control block. Covered bySafePointersTests. - Unique —
StormByte::Safe::Unique, complementsstd::unique_ptr(StormByte/safe/pointers.hxx). It does not replace it. Exact type:Safe::Heap::MakeUnique. Derived type:Unique<Base>::MakePointer<Derived>, and~Basemust be virtual or the call does not compile. Noreleaseand no constructor from a raw pointer. Converts on move tostd::unique_ptr<T, Safe::Heap::ObjectDeleter>only. Astd::unique_ptr<T>parameter has to change.Safe::Heapstays private and is not installed. Covered bySafePointersTests. - Weak —
StormByte::Safe::Weak, complementsstd::weak_ptr. Constructed only fromShared.lockreturnsShared, or empty when expired. No constructor fromstd::weak_ptr. Covered bySafePointersTests. - ClonableTests — clone / move /
MakePointercoverage forSharedandUnique.Derived::PointerTypeused as storage. Implicit conversion tostd::shared_ptr/unique_ptrwith Base deleter.ValidSmartPointerrejectsstd::shared_ptrand defaultstd::unique_ptr. A hidden-visibility shared library (ClonablePlugin) derives fromClonable; the tests check one sharedtypeid,dynamic_castandClone/Moveacross that boundary. - Size — abstract unit count (
uint64_tstorage), same width on every host and safe across a DLL. Not an octet length. Implicit conversion only tostd::size_t(clamp tosize_t::max); every other integral destination isexplicitand clamps toT::max. NoValue(), nooperator bool. Full arithmetic with anyType::Integraland with anotherSize; the result is alwaysSize. Mixed==/<=>with any integral and withByteSizeare hidden friends son == 5is not ambiguous. A negative integer operand is undefined andasserts when assertions are on. Overflow wraps in release.operator Safe::String/operator Safe::WStringprint the raw count (atoistyle). Explicit instantiations of the templates live in the StormByte DLL. Covered bySizeTests. - ByteSize — octet length (
uint64_tstorage), same width on every host and safe across a DLL. Implicit conversion only tostd::size_t(clamp); every other integral destination isexplicit. NoValue(), nooperator bool. Area products (ByteSize * ByteSize) are deleted. Scaling bySizeor by an integer is allowed and yieldsByteSize. IEC factories and free constants (B,KiB,MiB,GiB,TiB,PiB,EiB) so1 * KiBandByteSize::KiB(1)are 1024 octets. SI (KB…EB) likewise.operator Safe::String/operator Safe::WStringprint IEC text (0 B,1023 B,1.00 KiB,1.50 MiB). Explicit instantiations live in the StormByte DLL. Covered byByteSizeTests.
Changed
- Text API migration —
CString/WCStringmove toStormByte/safe/and remain public for explicit buffer use. Base text-producing APIs (Size,ByteSize, UUID, Base64,BinaryData,Telemetry) now exposeSafe::String/Safe::WString. Error messages and exceptions storeSafe::String; exception plain-text constructors acceptstd::string_vieworconst Safe::String&and copy the text. Both buffer and text-wrapper serialization retain the standard string wire format. - Shared vs static follows CMake
BUILD_SHARED_LIBS. There is noSTORMBYTE_SHAREDCMake option. When the library is shared, the compile definitionSTORMBYTE_SHAREDis still set sovisibility.hcan distinguishdllexport/dllimport/ static. - License change — original source in this repository is dual-licensed: GNU LGPL v3 or later, or a commercial license from the copyright holder. The grant applies only to original StormByte source in this repository. It does not cover other StormByte modules or third-party material (including
thirdparty/). No patent rights are grante...
Version 1.2.0
[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
Added
Stringhelpers that only read the input now takestd::string_view/
std::wstring_view:IsNumeric,ToLower,ToUpper,Explode,Split,
UTF8Encode,UTF8Decode,SanitizeNewlines,ToByteVector,
RemoveWhitespace,IsInteger.std::string,std::wstringand
literals convert to the views.Base64Decode(std::string_view)replacesBase64Decode(const std::string&).
Changed
SanitizeNewlinesno longer builds a throwaway copy and astd::regex;
it walks the view and maps\r\nto\n.
Version 1.1.1
[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
Added
- Type category concepts —
LvalueReferenceandRvalueReference(std::is_lvalue_reference/std::is_rvalue_reference), next to the existingReference. - SystemError —
Exceptionspecialization forStormByte::Systemhelpers.
Changed
- System::ExecutablePath — throws
SystemErrorinstead of returning"NOPATH". Paths longer than 256 bytes are resolved.
Fixed
- Type::CopyConstructible / CopyAssignable — no longer wrap
std::is_copy_*alone. They require a realT{src}/dest = srcand recurse intovalue_typeonly whenTis aType::Containerand not aType::View.std::span<std::unique_ptr<T>>stays copyable;std::vector<std::unique_ptr<T>>does not. - Type::HasPushBack / HasPushFront / HasInsert — accept
value_type&&as well asconst value_type&.std::vector<std::unique_ptr<T>>is nowHasPushBack, soIterable::addtakes thepush_backpath. - Iterable::add — one forwarding
add(T&&)plus a by-value sink for braced-init (add({"k", v})). The sink writes to the container; it does not calladdagain (that recursed until a stack overflow). clang-cl / MSVC no longer instantiatepush_back(const unique_ptr&). - Iterable container constructor — single
Iterable(C&&)constrained toContainer. An lvalue copy requiresType::CopyConstructibleonvalue_type; a move requiresType::MoveConstructible. - Iterable copy / move — defaulted copy and copy-assign require
Type::CopyConstructible/Type::CopyAssignableonContainer; move and move-assign requireType::MoveConstructible/Type::MoveAssignable.Iterable<std::vector<std::unique_ptr<T>>>is move-only. - Iterable::Iterator / ConstIterator — arithmetic (
+=,-=,+, difference) usesstd::advance/std::distanceinstead ofm_it += n, so it compiles on bidirectional containers (list,map,set).reference/pointercome fromstd::iterator_traitsof the wrapped iterator, notContainer::reference(*itonstd::setisconst T&). - System::TempFileName — throws
SystemErrorinstead ofstd::runtime_error. The file is created and left on disk; the caller unlinks it. Windows still only uses the first three characters ofprefix. - System::ExecutablePath — grows the platform buffer instead of truncating at 256 bytes (
GetModuleFileNameW/readlink). Failure isSystemError, not a fake path. - System::CurrentPath — wraps
std::filesystem::filesystem_errorinSystemErrorinstead of leaking a standard exception. - Iterable copy / copy-assign — user-provided members with
if constexpronType::CopyConstructible/CopyAssignable. clang-cl / MSVCdllexportof a derived class no longer instantiatesvector<unique_ptr<T>>copy viarequires = default.
Version 1.1.0
[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
Added
- Component — wrapper for the module name on the component-prefixed
Exceptionconstructor. Call sites must now writeException(Component("Base64"), "…", args...). - Type concepts —
Sized,SmartPointer,Swappable,DerivedFrom,EqualityComparable,ThreeWayComparable,Hashable. - Type range and pointer concepts — range/iterator category wrappers, range value/reference/difference aliases,
ExplicitlyConvertibleTo,NullablePointer,ByteInputRange, andByteInputIteratorfor public generic APIs. - Type object-semantics concepts —
TriviallyDefaultConstructible,TriviallyCopyConstructible,CopyAssignable,TriviallyCopyAssignable,TriviallyMoveConstructible,MoveAssignable,TriviallyMoveAssignable,Copyable,Movable, rounding out the existingCopyConstructible/MoveConstructible/TriviallyCopyable/TriviallyDestructible/Swappablegroup. - Test handlers — assertions evaluate operands once and report non-streamable values safely. New macros:
ASSERT_THROWS,ASSERT_NO_THROW,ASSERT_NEAR,ASSERT_CONTAINS,ASSERT_NOT_NULL, covered byTestHandlersTests. - UTF8Error — custom exception for invalid UTF-8 and wide-string Unicode input.
Changed
- Exception(component, fmt, args...) — first argument is
Component, notstd::string. Source-breaking for every call that used the old two-string form. - Type concepts — reorganized
type_traits.hxxinto focused container, wrapper, conversion, category, range, relation, and comparison groups without changing public contracts. - Template implementation split —
Bitmask,Clonable,Iterable(including its nestedIterator/ConstIterator), andSerializablenow declare their members in the.hxxheader and define them in a matching.txxfile included at the bottom of the header. Public API and behavior are unchanged;.txxfiles are installed alongside the headers. - Serializable explicit instantiation —
bool, all standard character/integer/floating-point types, and the four Codec-backed string types (std::string,std::wstring,std::u16string,std::u32string) are now explicitly instantiated inside the shared/dynamic library and declaredextern templatein the header, so consumers link against the library's code instead of re-instantiating it locally.
Removed
StormByte::swap_endian— the transitional alias ofType::Detail::swap_endianin the rootStormBytenamespace. CallStormByte::Type::Detail::swap_endiandirectly instead.
Fixed
- Exception(component, fmt, args...) —
Exception(fmt, args...)was chosen for every call with 2+ arguments, so the component string became the whole message and the format/args were discarded.Componentmakes the prefixed overload the only viable candidate. - Exception(format_string, Args...) — the zero-argument path called
copy_str(fmt), which did not compile when that branch was selected (e.g. construction fromstd::string_view). It now copiesfmt.get(), matching the documented “message as-is” behaviour. - Iterable::add —
add(const value_type&)requiresType::CopyConstructible;add(value_type&&)requiresType::MoveConstructible. clang-cl / MSVC no longer instantiatepush_back(const unique_ptr&). - Iterable::Iterator / ConstIterator —
iterator_categoryis taken from the underlying container iterator instead of being hardcoded asrandom_access_iterator_tag.std::distance/std::advancecompile onIterable<std::list<…>>,map,set, etc. - System::TempFileName — builds the
mkstemptemplate in astd::stringsized to the prefix instead of a 256-byte buffer, so a long prefix no longer truncates the trailingXXXXXX. - Serializablestd::array — deserializes elements by index and rejects a serialized count that does not match the array extent.
- Serializable constrained helpers — container/pair/optional/trivial private helpers are member templates (
template<typename U = T> requires Type::* <U>) sotemplate class Serializable<bool>/charno longer instantiate bodies that call.size()on a scalar (clang-cl / clang++). - Unexpected(Derived) — no longer conflicts with
Unexpected<E>(error)whenBaseandDerivedare the same type. - String —
ToLower/ToUpperno longer pass negative signed values to the C character functions; negative byte sizes keep their sign instead of wrapping. - String UTF-8 conversion — wide-string conversion is now locale-independent and rejects malformed Unicode input with
UTF8Error.
Version 1.0.0
[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.