|
RSTools 3.1.0
Versatile C++20 utility library
|
RSTools is the foundational utility toolkit of RSLib (R Super Librairie).
Born from the need to stop rewriting the same boilerplate code across different applications, RSTools provides a versatile, highly reusable set of C++ utilities designed to make everyday development faster, safer, and more efficient. Whether you are building a small personal script or a large-scale system architecture, RSTools has you covered with ready-to-use tools.
Include <RST/RST.hpp> for everything, or only the header of a module, such as <RST/string/String.hpp>.
| Module | Namespace | Highlights |
|---|---|---|
| ๐ค String | RST::String | Trim, split, join, replace, case, number parsing, compile-time hashing |
| ๐งฎ Maths | RST::Maths | Constants, interpolation, random numbers, 2D/3D vectors, matrices |
| ๐จ Color | RST::Color | RGBA colors, hex and HSV conversions, blending |
| ๐ป System | RST::System | CPU, memory, OS and disk info, environment variables, files, paths |
| โฑ๏ธ Time | RST::Time | Stopwatch, frame timer, date formatting |
| โ๏ธ Parser | RST::Parser | Command-line parser with subcommands, validation and generated help |
| ๐ Log | RST::Log | Thread-safe loggers, console and file sinks, patterns, macros |
| ๐งต Threads | RST::Threads | Thread pool with task priorities |
| โ Test | RSTest.hpp | Minimal unit-test macros |
| ๐ Crypto | RST::Crypto | Coming soon |
Requirements: a C++20 compiler (GCC 13+ or Clang 17+) and CMake 3.28+.
Add RSTools to your CMakeLists.txt with FetchContent:
Or clone it into your project and use add_subdirectory(lib/RSTools) instead of FetchContent.
| CMake option | Default | Description |
|---|---|---|
RST_BUILD_TESTS | ON for the main project | Build the unit tests |
RST_BUILD_EXAMPLES | ON for the main project | Build the examples |
RST_BUILD_DOCS | OFF | Build the API documentation (requires Doxygen) |
Here is a quick glimpse of how easy it is to use RSTools in your main application:
More in the examples and the documentation.
RSTools is a community-driven library. Whether you want to fix a bug, add a function, improve the logger or fix a typo, your help is welcome: see CONTRIBUTING.md to get started, and CHANGELOG.md for what changed in each release.
Distributed under the MIT License. See LICENSE for more information.