Repository navigation
Releases: StormByte-Suite/StormByte-Config
Release list
Version 2.0.2
[Summary]
StormByte Config is the configuration-document module of the StormByte C++ suite.
It depends on StormByte Base 2.1.0 and StormByte-BuildMaster >= 2.1.0. This repository is not Base, Buffer, Crypto, Database, Logger, Multimedia, Network or System.
Public headers under StormByte/config/ cover text and versioned binary documents: values, groups, lists, comments, hooks and Save / Load.
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
ENABLE_PGOandENABLE_LTO. Profile-guided optimization trains inpgo-instrand installs this build. Link-time optimization followsENABLE_LTO(default ON) for every build type. Both apply to Config. Base is not rebuilt.- Release archives include
THIRD-PARTY(notTHIRDPARTY: on Windows and macOS that name is the same path as thethirdparty/directory, so the file never landed in those zips). No third-party object code is compiled into this shared library. StormByte Base is linked at run time and keeps its own notice.
Changed
- CI builds with
ENABLE_LTO=ON,ENABLE_PGO=OFFandENABLE_TEST=ON, then runs ctest. Profile-guided optimization stays on the release workflow. - Requires StormByte-BuildMaster >= 2.1.0. An older install is not used; the
buildmastersubmodule supplies 2.1.0. - Requires StormByte Base 2.1.0. The build downloads that release archive (
stormbyte_component_url) and links it withBACKEND=binary. The Base submodule is gone. The archive matches this OS and C++ runtime:libstdc++orlibc++on Linux and macOS, no runtime suffix on Windows. - Breaking:
Config::Exceptionno longer formats withstd::format. A message with arguments replaces literal{}throughSafe::String::ReplaceToken, the same rule as Base 2.1.0.what()staysStormByte.Config: message, andException::Pathstill appends a segment underConfig. Value::Serializewrites an integer or a double withSafe::String::ReplaceToken, which usesstd::to_string. A double is six digits after the decimal (42.0is42.000000), not the shorterstd::formattext. A value with no decimal point still gets.0.- Bumped version to 2.0.2.
Fixed
-stdlib=libc++and-stdlib=libstdc++do not count as custom C++ flags. If either is the only extra flag, Release still gets-O2and the CPU baseline.cmake/optimizations.cmakeis the same file as Base. On Release, and only when that language was not set from the outside, it appendsOPTIMIZATION_FLAGS_LINUX,OPTIMIZATION_FLAGS_MACorOPTIMIZATION_FLAGS_WINDOWS. Linux is-O2 -march=x86-64-v3, Apple is-O2 -mcpu=apple-m1, Windows is/O2 /arch:AVX2. There is no/fp:fastand no/EHsc.cmake/pgo.cmakeis the same file as Base, so a forwarded list keeps its semicolons.- The Base archive follows the C++ library this compiler actually uses. A Gentoo clang config that selects libc++ does not appear in
CMAKE_CXX_FLAGS, so the helper used to download the libstdc++ zip and the tests failed to link. It now preprocesses one line with that compiler and reads_LIBCPP_VERSIONor__GLIBCXX__. - Part of the port: the DLL does not return a
std::object.std::strong_orderingis not a DLL ABI. clang-cl returns it through a hidden pointer and MSVC does not pass one, so a call into a clang-built Base wrote at address 0. Ordering is compiled by the caller from Base 2.1.0, where those operators areSTORMBYTE_FORCE_INLINE. A signature that must returnstd::(operator std::string, an error code) isSTORMBYTE_FORCE_INLINEin the header too. This archive must be built against that Base. Value::Serializewrites a double with six digits after the decimal on every standard library.ReplaceTokenusesstd::to_string, and libc++ prints the shortest round-trip (3.141592653589793,42), so the text was not3.141593and42.000000. The digits now come fromstd::to_charswith a fixed format and are passed toReplaceTokenas text.cmake/pgo.cmakematches Base. MSVC PGO links with/LTCG:PGINSTRUMENTand/LTCG:PGOPTIMIZE./GENPROFILEalone fails with LNK1220 because the currentlink.exerequires an/LTCGspecification, and CMake's own/LTCGstays off so it does not replace the profile mode. The profile mode isadd_link_optionson this project, notCMAKE_EXE_LINKER_FLAGS. A nestedproject()inherits the cache and its compiler test linkscmTC_*.exe, which was never instrumented, so/LTCG:PGOPTIMIZEaborted with LNK1266 (cmTC_*.pgdmissing). The cache keeps a bare/LTCGso those/GLobjects still link. A static dependency stays LTCG and is optimized by the link that owns the.pgd.- Clang PGO drops
.profrawfiles left by compiler probes before ctest, andllvm-profdata mergeuses-failure-mode=all. A probe writes a few hundred bytes formain, with a padded empty symbol name. The default failure mode isany, so that one file aborted the merge even after the instrumented tests had passed.
Version 2.0.1
[Summary]
StormByte Config is the configuration-document module of the StormByte C++ suite.
It depends on StormByte Base ≥ 2.0.0. This repository is not Base, Buffer, Crypto, Database, Logger, Multimedia, Network or System.
Public headers under StormByte/config/ cover text and versioned binary documents: values, groups, lists, comments, hooks and Save / Load.
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
Changed
- Updated dependency pins.
- Bumped version to 2.0.1.
Version 2.0.0
[Summary]
StormByte Config is the configuration-document module of the StormByte C++ suite.
It depends on StormByte Base ≥ 2.0.0. This repository is not Base, Buffer, Crypto, Database, Logger, Multimedia, Network or System.
Public headers under StormByte/config/ cover text and versioned binary documents: values, groups, lists, comments, hooks and Save / Load.
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
Changed
- Config item classes are registered with Base's
MaybeSafetrait when their Base-owned storage and out-of-line destruction satisfy the documented DLL-boundary contract. Plain exception messages acceptstd::string_viewand are copied into Base-owned exception storage inside the Config module. - Shared vs static follows CMake
BUILD_SHARED_LIBS(declared in the project root, default ON). There is noSTORMBYTE_CONFIG_SHAREDCMake option. When the library is shared, the compile definitionSTORMBYTE_CONFIG_SHAREDis still set sovisibility.hcan distinguishdllexport/dllimport/ static. CI passes-DBUILD_SHARED_LIBS=ON. - Breaking: Item model and storage APIs:
Item::Value<T>is gone. There is one concreteItem::Valueleaf. Typed access isBase::As<T>(): node types (Value,Group,List,Comment<...>) or leaf tags (Integer,Double,Bool,Text,Binary).item.As<Value>() = 3.65andint i = item.As<Integer>()are the public getters. Integer promotes to Double; Double does not narrow to Integer.- Public binary payloads are
StormByte::Safe::Binary, notstd::vector<std::byte>. Text still uses Base64b"..."; the binary writer emitsSerializable<Safe::Binary>. - Counts and container indices use
StormByte::Size.operator[]onList/GroupisSize, notsize_t. Item::BaseisClonable<Base, StormByte::Safe::Shared<Base>>.PointerTypeis no longerstd::shared_ptr. Construction goes throughMakePointer.Serializable::SerializeisSafe::Binary; the on-disk reader buffer stays a localstd::vector<std::byte>.- Configuration names, text values and comments use
StormByte::Safe::Stringfrom Base. Text binary serialization uses Base'sSerializable<Safe::String>codec. The scalar payload is aSafe::Variant. - Item collections use
StormByte::Safe::Vector; path traversal usesStormByte::Safe::Queue. Public STL convenience adapters run on the consumer side; text, binary data and expected results use Base-owned storage across DLL boundaries.
- Breaking: DLL-boundary lifetime and exception contracts:
- Item and Config destructors are out of line in this module so
catchandtypeidstay on one CRT across a DLL. StormByte::Config::Exceptionuses its own explicitPathwrapper for additional segments nested belowStormByte.Config; a custom segment can never replaceConfig.Componentis gone, andwhat()starts withStormByte.Config.- Item classes and
Configare registered with Base'sMaybeSafetrait only where construction, copy/move, assignment, destruction, storage ownership, and heap-affecting clone operations meet its documented provider contract. Plain Config exception messages acceptstd::string_viewand are copied inside the Config module.
- Item and Config destructors are out of line in this module so
- Breaking: Read and failure hook API: Hooks use copyable
StormByte::Safe::Functionvalues. Read callbacks receive a Base-ownedSafe::Shared<Item::Group>handle and commit mutations only when the callback succeeds; failure callbacks receive a Base-owned const group handle and return whether the parse error should propagate.MakeReadHook/MakeFailureHookkeep callable context cloning and release in the consumer module, including for capturing lambdas. Hook collections use Base-ownedSafe::Vectorstorage. Hook objects are built withSafe::MakeShared. - Names, paths,
Group,ListandValueacceptstd::string_view(a literal, astd::stringor aSafe::String).Item::Valuealso takesconst char*for a text literal, because a pointer would otherwise preferbool. A custom Config exception path is anException::Pathplus a plain message. - Requires StormByte Base ≥ 2.0.0.
Version 1.1.0
[Summary]
StormByte Config is the configuration-document module of the StormByte C++ suite.
It depends on StormByte Base. This repository is not Base, Buffer, Crypto, Database, Logger, Multimedia, Network or System.
Public headers under StormByte/config/ cover text and versioned binary documents: values, groups, lists, comments, hooks and Save / Load.
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
Addpointer overloads: AddedAdd(Base::PointerType)overloads toConfigandContainerfor direct item pointer insertion.
Fixed
- Container path exception safety: Prevented stock C++ exception leaks (
std::out_of_range,std::invalid_argument) when looking up or removing numeric or malformed container paths, throwingStormByte::Config::OutOfBoundsorStormByte::Config::InvalidPathinstead. - Double precision serialization: Switched
Value<double>::Serializetostd::formatfor full floating-point precision and ensured integer-like floating point values maintain a.0suffix so they are recognized as Double tokens by the parser. - Container null item protection: Added null pointer check at the start of
Container::Addto prevent null pointer dereferences when propagating container policies.
Changed
- Exception handling: Ported
StormByte::Config::Exceptionconstructors to passStormByte::Component("Config")introduced in StormByte Base 1.1.0, automatically formatting exception messages withStormByte::Config:. - Dependencies: Requires StormByte Base ≥ 1.1.0.
- Type traits: Replaced stock C++ type traits (
std::is_same_v,std::is_base_of_v) with StormByte flavor equivalents (StormByte::Type::SameAs,StormByte::Type::DerivedFrom).
Version 1.0.0
[Summary]
StormByte Config is the configuration-document module of the StormByte C++ suite.
It depends on StormByte Base. This repository is not Base, Buffer, Crypto, Database, Logger, Multimedia, Network or System.
Public headers under StormByte/config/ cover text and versioned binary documents: values, groups, lists, comments, hooks and Save / Load.
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 Config.
Added
Configdocument withoperator<</operator>>for textSave/LoadwithMode::TextandMode::Binary- Versioned binary envelope: magic
STBTCF+ format version + payload - Values: string, integer, double, boolean, binary (
std::vector<std::byte>) - Text binary values as Base64
b"..."; raw bytes on the binary wire - Comments:
#,//,/* */ - Containers: lists
[]and groups{} - Pre/post read hooks (
AddHookBeforeRead/AddHookAfterRead) OnExistingAction(Keep,Overwrite,ThrowException; default is throw)- Project version read from the
VERSIONfile - CMake 3.28 floor
Notes
- Stream operators are text-only. Use
Save/Loadfor binary. - Older supported binary versions load fully; newer versions are rejected.
- Save always writes the current format version.
- Needs a C++26 compiler and StormByte Base ≥ 1.0.0.