All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Summary]
StormByte System is the C++26 process, device and host layer of the StormByte suite.
It depends directly on StormByte Base 3.0.0 and StormByte-BuildMaster >= 2.1.4. This repository is not Base, Buffer, Config, Crypto, Database, Logger, Multimedia or Network.
Spawn children with piped stdin/stdout/stderr, classify the medium behind a path, resolve directories and the current executable, inspect the machine, name the calling thread, and expand environment strings. POSIX and Windows stay behind one API. Failures are StormByte::Error::Fault in a per-type domain (StormByte.System.*). Nothing in this module throws. Text that crosses a DLL boundary is StormByte::Safe::String / StormByte::Safe::WString, not std::string by value.
From 2.0.0, original System sources are dual-licensed: GNU Lesser General Public License v3.0 or later, or a commercial license from the copyright holder. That change does not cover other StormByte modules or third-party material under thirdparty/ (including bundled StormByte Base).
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: dual license LGPL-3.0-or-later or commercial, LICENSE
3.0.0 - 2026-11-04
Added
- Install FindStormByteSystem.cmake so Base 3.0.0 can discover System as a component. Verify a real consumer against the installed prefix and an extracted release ZIP.
Changed
- Breaking: Require StormByte Base 3.0.0 for bundled builds.
- Require StormByte-BuildMaster 2.1.4 for bundled builds.
- Select the Base release archive by Linux architecture, libc and C++ standard library, matching the published amd64/arm64 assets.
- Breaking: Linux release ZIP names now include architecture, libc and C++ standard library.
- Build and test the eight Linux CI variants on native amd64/arm64 runners across glibc/musl and GCC/libstdc++ or Clang/libc++; use cpu-baseline: auto with PGO/LTO disabled in CI, and enable PGO/LTO in the matching release jobs.
Fixed
- PGO training runner now prepends its library directories to LD_LIBRARY_PATH/DYLD_LIBRARY_PATH with the : separator (previously ;, which broke library lookup on musl) and no longer appends an empty entry when the variable is unset.
- Reconfigure automatically when VERSION changes so rebuilt and installed artifacts use the updated project version.
- Stop injecting an x86-specific CPU baseline and overriding compiler optimization defaults in manual Release builds; CPU flags now come from the toolchain, while ENABLE_LTO remains independently configurable.
- Accept an explicitly unavailable CPU model in the host tests when the operating system does not report one, as on some ARM64 virtual machines.
2.1.3 - 2026-11-02
Fixed
- Error-code assertions in the device, directory, file, host and thread tests retain their Fault owner while comparing its code. Previously the assertion macros kept references into destroyed temporaries, causing stack-use-after-scope failures under AddressSanitizer.
Changed
- Bundled builds use Base 2.2.3, including corrected exception contracts and allocation-failure cleanup for safe text operations.
- Rebuild release packages against the refreshed Base 2.2.3 release, including allocation-safe telemetry and map/set constructor fixes.
2.1.2 - 2026-10-28
Changed
- Bundled builds use Base 2.2.2. Require BuildMaster 2.1.3 and pin its bundled submodule to the published release.
2.1.1 - 2026-10-24
Changed
- Bundled third-party StormByte dependencies now require the matching patch releases (Base 2.2.1, Buffer 2.0.4, Logger 2.0.4, System 2.1.1 where applicable) so a bundled build picks up the /arch:AVX change.
Changed
- Windows Release optimizations use /arch:AVX instead of /arch:AVX2. The previous baseline required a Haswell-or-newer CPU (AVX2). /arch:AVX runs on Sandy Bridge and Ivy Bridge (including the i7-3770K) and later.
2.1.0 - 2026-10-23
Added
- Host::CPU query object with Model, Manufacturer, Architecture, PhysicalCores, LogicalProcessors and Bitness.
- Host::Motherboard query object with independent Manufacturer, Model and Revision probes using Linux sysfs DMI, Windows BIOS registry and macOS IOKit. macOS revision reports NotSupported.
- Host errors NotSupported, Unavailable and Permission distinguish missing properties from platform failures. Query objects perform no I/O on construction; accessors update LastError on demand, except CPU::Bitness.
Changed
- Bumped StormByte Base dependency from 2.1.0 to 2.2.0.
- Bumped version to 2.1.0.
- Breaking: Host::CPU() now constructs a query object instead of returning a processor brand string. Use Host::CPU().Model() for the previous text.
- Breaking: moved Host::Architecture(), Host::LogicalProcessors() and Host::Bitness() to Host::CPU instance methods. CPU::LogicalProcessors() now updates LastError and counts OS-visible online processors (all processor groups on Windows); CPU::Bitness() preserves process pointer-width semantics and does not update LastError. Physical/available memory APIs are unchanged.
2.0.2 - 2026-10-19
Added
- ENABLE_PGO and ENABLE_LTO. Profile-guided optimization trains in pgo-instr and installs this build. Link-time optimization follows ENABLE_LTO (default ON) for every build type. Both apply to System. Base is not rebuilt.
- Release archives include THIRD-PARTY (not THIRDPARTY: on Windows and macOS that name is the same path as the thirdparty/ 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=OFF and ENABLE_TEST=ON, then runs ctest. Profile-guided optimization stays on the release workflow.
- cmake/optimizations.cmake is the same file as Base. On Release, and only when that language was not set from the outside, it appends OPTIMIZATION_FLAGS_LINUX, OPTIMIZATION_FLAGS_MAC or OPTIMIZATION_FLAGS_WINDOWS. Linux is -O2 -march=x86-64-v3, Apple is -O2 -mcpu=apple-m1, Windows is /O2 /arch:AVX2. There is no /fp:fast and no /EHsc. cmake/pgo.cmake is the same file as Base, so a forwarded list keeps its semicolons.
- Requires StormByte-BuildMaster >= 2.1.0. An older install is not used; the buildmaster submodule supplies 2.1.0.
- Requires StormByte Base 2.1.0. The build downloads that release archive (stormbyte_component_url) and links it with BACKEND=binary. The Base submodule is gone. The archive matches this OS and C++ runtime: libstdc++ or libc++ on Linux and macOS, no runtime suffix on Windows. Doxygen include path is ${BUILDMASTER_INSTALL_INCLUDEDIR}, not thirdparty/StormByte/base/src.
- 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 -O2 and the CPU baseline.
- Linux device classification splits dev_t with the major and minor macros from <sys/sysmacros.h>. gnu_dev_major and gnu_dev_minor are glibc-only, so device.cxx did not compile on musl.
- Part of the port: the DLL does not return a std:: object. std::strong_ordering is 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 are STORMBYTE_FORCE_INLINE. make_error_code and Domain::Message are STORMBYTE_FORCE_INLINE in the header for the same reason. Variable::HomePath is no longer public: it returned std::filesystem::path from the DLL and is now a file-local helper. This archive must be built against that Base.
- cmake/pgo.cmake matches Base. MSVC PGO links with /LTCG:PGINSTRUMENT and /LTCG:PGOPTIMIZE. /GENPROFILE alone fails with LNK1220 because the current link.exe requires an /LTCG specification, and CMake's own /LTCG stays off so it does not replace the profile mode. The profile mode is add_link_options on this project, not CMAKE_EXE_LINKER_FLAGS. A nested project() inherits the cache and its compiler test links cmTC_*.exe, which was never instrumented, so /LTCG:PGOPTIMIZE aborted with LNK1266 (cmTC_*.pgd missing). The cache keeps a bare /LTCG so those /GL objects still link. A static dependency stays LTCG and is optimized by the link that owns the .pgd.
- Clang PGO drops .profraw files left by compiler probes before ctest, and llvm-profdata merge uses -failure-mode=all. A probe writes a few hundred bytes for main, with a padded empty symbol name. The default failure mode is any, so that one file aborted the merge even after the instrumented tests had passed.
2.0.1 - 2026-10-13
Changed
- Updated dependency pins.
- Bumped version to 2.0.1.
2.0.0 - 2026-10-10
Added
- Device: classify the medium behind a path (Kind, Access bitmask, nominal Throughput, suggested Window).
- Directory: current, home, temporary and current-executable directories. bool + out String; LastError() is TLS in this module.
- File: Temporary(prefix, suffix) creates an empty file the caller unlinks; CurrentExecutable is the running image.
- Host: name, architecture, CPU brand, OS, kernel, page size, physical/available memory, logical processors, process bitness.
- ThisThread: Sleep; get/set thread name (TooLong if the platform limit is exceeded; the name is not truncated).
- Dual license on original System sources: LGPL-3.0-or-later or commercial (LICENSE + COPYING.LGPLv3).
- Shared vs static follows CMake BUILD_SHARED_LIBS (declared in lib/, default ON). There is no STORMBYTE_SYSTEM_SHARED CMake option. When the library is shared, the compile definition STORMBYTE_SYSTEM_SHARED is still set so visibility.h can distinguish dllexport / dllimport / static. Vendored StormByte Base follows the same BUILD_SHARED_LIBS mode and is configured with ENABLE_TEST=OFF.
Changed
- Breaking: Windows Process::Pid() returns only the child process identifier (DWORD); process and thread handles remain private to the Process owner.
- Breaking: Process no longer throws. Spawn, wait and stdin failures are StormByte::System::Process::Error in domain StormByte.System.Process, held as Fault().
- operator bool is true only while a child is live (RUNNING or SUSPENDED).
- Timed Wait sets TimedOut and leaves the child running. A second wait after a successful reap sets AlreadyExited.
- A failed stdin write sets BrokenPipe.
- Breaking: Variable::Expand has one public entry per width: std::string_view and std::wstring_view. A literal binds. A Safe::String / Safe::WString binds through its view conversion. The result is StormByte::Safe::String. On Windows, a failed ExpandEnvironmentStringsW returns the original text (same as a missing UNIX home).
- Breaking: Process has one public constructor: UTF-8 std::string_view plus StormByte::Safe::Vector<StormByte::Safe::String> arguments. A literal binds. A Safe::String binds through its view conversion. The view is copied into Base-owned text before the DLL boundary. Native filesystem-path conversion stays inside System, so neither std::filesystem::path nor std::vector crosses that boundary.
- Breaking: Process::operator<< has one public text entry, std::string_view. A literal and a Safe::String bind there. operator<<(EoF) still closes stdin.
- Pipe construction and I/O no longer throw. Invalid pipes convert to false.
- Public text across a DLL boundary uses StormByte::Safe::String / StormByte::Safe::WString; borrowed views carry explicit lengths. Native C-string copies are allocated and destroyed inside System, without relying on NUL termination in Base text buffers.
- Breaking: System vendors StormByte Base 2.0.0 directly instead of StormByte-String and exposes Base's StormByte::Safe owned-text types in its public API. Headers include StormByte/safe/*.hxx instead of StormByte/string/*.hxx, StormByte/cstring.hxx and StormByte/wcstring.hxx.
- Visibility macros follow Base/Logger (EXPORTS / STORMBYTE_SYSTEM_SHARED / static empty).
- Windows Device probe links iphlpapi and ws2_32. Host CPU name links advapi32. macOS Device probe links IOKit and CoreFoundation.
- Breaking: Host::PageSize, PhysicalMemory and AvailableMemory return ByteSize. They are octet lengths.
- Breaking: Device::Window is ByteSize. Device::Throughput stores octets per second as ByteSize, not std::size_t.
- Breaking: Process::operator>> and Stderr take StormByte::Safe::String, not std::string. The captured text is owned by Base. operator<<(std::ostream&, const Process&) is STORMBYTE_FORCE_INLINE, so the stream buffer grows in the caller. operator>> stays String only: a view cannot own the bytes that were read.
- Process owns its private implementation through StormByte::Safe::Unique, allocated and freed on Base's heap.
Removed
- Breaking: Process stdin and Variable::Expand overloads for Base's removed CString / WCString types. Use String, WString or the corresponding length-aware views.
- Breaking: StormByte/system/exception.hxx (Exception, FileIOError, ExecutableNotFound, ProcessCreationError).
- Breaking: StormByte::System::Error and StormByte/system/error.hxx (domain StormByte.System). Device, Process, Directory, File, Host and ThisThread keep their own domains.
1.1.0 - 2026-09-13
Changed
- Public process behavior
- Ported System exception messages to the StormByte::Component format and added ProcessCreationError for process creation failures.
- Added a public timed Wait(std::chrono::milliseconds) overload; the existing untimed overload remains unchanged.
- Process pipeline internals
- Moved forwarding into the internal Pipe abstraction while preserving buffered and future output.
- Moved Process state into the private process implementation header, reducing public-header ABI exposure.
- Dependencies and build configuration
- Updated the StormByte/base dependency to 1.1.0.
- Switched Windows release optimization handling to CMake interprocedural optimization without duplicate manual compiler/linker flags.
Fixed
- Pipe and process lifecycle
- Pipe construction now checks platform errors, normalizes UNIX descriptors, and moved pipes invalidate their source endpoints.
- Pipe reads, writes, polling, EOF handling, and descriptor binding now distinguish interruption, EOF, and failure.
- Process pipeline forwarding retains pipe ownership independently of Process lifetime, supports safe reconnection, and cancels without cross-thread descriptor closure.
- Process waiting no longer deadlocks on downstream backpressure; lifecycle joins handle unexpected thread errors without escaping noexcept cleanup paths.
- Direct writes, interrupted waits, and Windows wait failures now preserve error and ownership semantics.
- Process startup and platform handling
- UNIX startup reports execvp failures to the parent and throws the appropriate exception eagerly.
- Windows startup quotes command-line arguments and distinguishes missing executables from other creation failures.
- Environment expansion handles missing home directories safely, expands only leading ~ paths, and grows Windows buffers as needed.
- Regression coverage
- Added coverage for pipelines, process moves, signal termination, interrupted waits, descriptor reuse, consumer exit, direct write failures, and oversized Windows environment expansion.
- CI portability
- Fixed Windows-only Process implementation initialization.
- Made UNIX process tests resolve utilities through PATH for macOS portability.
1.0.0 - 2026-09-05
Initial public release of StormByte-System.
Added
- Process: run external programs with piped stdin / stdout / stderr
- Move-only ownership; starts on construction
- Wait() for exit code (blocking, no timeout)
- Suspend() / Resume()
- Stream operators: write stdin, read stdout, << System::EoF to close stdin
- Process chaining (p1 >> p2) via background forwarder
- Stderr() to read the stderr pipe
- Cross-platform (POSIX fork/exec and Windows CreateProcessW)
- Pipe (internal): anonymous pipes for IPC (UNIX pipe/pipe2, Windows CreatePipe)
- Atomic chunked writes, bind/dup helpers, handle inheritance flags on Windows
- Variable: expand environment strings (Windows ExpandEnvironmentStrings; UNIX ~ → home)
- Exceptions: Exception, FileIOError, ExecutableNotFound
- Unit tests for Linux, macOS and Windows (pipelines, stdin, exit codes, move)
Fixed
- Process move no longer double-waits the same child (ownership is fully transferred)
- Failed execvp in the child uses _exit(127) instead of throwing across fork
- Removed unimplemented Pipe::BindRead(Pipe&) / BindWrite(Pipe&) declarations
- Pipes owned with std::unique_ptr instead of raw new/delete
- SIGPIPE ignored once per process (not on every Pipe construction)
- WriteAtomic treats empty input as success
- Windows command line built without a trailing space
Notes
- On UNIX, if the executable cannot be started, the child exits with status 127; the parent does not throw from the child path.
- Wait() has no timeout; it blocks until the process ends.