STX - Systems Toolbelt for C++23
STX is a header-only C++23 library providing type-safe abstractions and utilities for systems programming, binary analysis, runtime instrumentation, and scripting at the OS/hardware interface.Version 2.0.0 — This project is intended for personal use and experimentation. Users are free to fork or modify it, but all usage is at their own risk.
Key Features
Header-Only
Zero dependencies beyond the C++23 standard library
Type Safety
Strong types for offsets, addresses, and function signatures
Zero Overhead
Constexpr-friendly abstractions with no runtime cost
C++ Modules
Optional module support for modern build systems
Core Capabilities
STX provides six specialized modules for low-level programming:Memory Utilities
Memory Utilities
Safe memory access, alignment primitives, and colored hexadecimal dumps for inspection and debugging.
File System
File System
Type-safe, binary-oriented file operations with explicit stream state management.
Functions
Functions
Strongly-typed wrappers around arbitrary memory addresses for callable functions.
Time Utilities
Time Utilities
Portable UNIX time conversions and high-resolution stopwatch functionality.
Ranges
Ranges
Domain-safe, constexpr-friendly integer and strong-type ranges for iteration.
Core Types
Core Types
Fundamental fixed-width types, strong types, and compile-time concepts.
Use Cases
STX is designed for developers working in:- Binary Analysis — PE/ELF/Mach-O parsers and format analysis tools
- Runtime Patching — Memory manipulation and code injection
- Reverse Engineering — Low-level inspection and instrumentation utilities
- Systems Programming — Loader implementations and OS interface tooling
- Security Research — Red teaming and vulnerability research tools
Quick Example
example.cpp
dirty_vector.
Get Started
Quickstart
Get up and running in minutes
Installation
Installation guide for CMake and Xmake
API Reference
Explore the complete API documentation
Examples
Learn from real-world examples