https://github.com/morgancaron/cpputils
C++ Utilities Library for compilers or various projects
https://github.com/morgancaron/cpputils
compiler cpp cpp20 cpp23 cpputils logger parser parser-combinators parser-generator utility-library
Last synced: 2 months ago
JSON representation
C++ Utilities Library for compilers or various projects
- Host: GitHub
- URL: https://github.com/morgancaron/cpputils
- Owner: MorganCaron
- License: lgpl-3.0
- Created: 2020-01-29T15:38:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-10T21:42:13.000Z (3 months ago)
- Last Synced: 2025-05-12T17:15:27.618Z (2 months ago)
- Topics: compiler, cpp, cpp20, cpp23, cpputils, logger, parser, parser-combinators, parser-generator, utility-library
- Language: C++
- Homepage:
- Size: 1.12 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# CppUtils
## *C++ Utilities Library*



[](https://discord.gg/mxZvun4)
[](https://github.com/MorganCaron/CppUtils/blob/master/LICENSE)### Project Health



---
### In this library you can find:
- Additional containers ([bidirectional map](modules/Container/BidirectionalMap.mpp), [b-tree](modules/Container/BTree.mpp), [meshes](modules/Container/MeshNetwork.mpp), [stacks](modules/Container/Stack.mpp), [trees](modules/Container/Tree.mpp))
- A [file modification listener](modules/FileSystem/Watcher.mpp)
- Tools for creating parsers and compilers (Work in progress)
- Parsers and compilers for popular languages (CSS, INI, HTML, JSON, Markdown, XML) (Work in progress)
- A logger [logger](modules/Log/Logger.mpp) with a [file rotation system](modules/Log/LogRotate.mpp)
- [Benchmark tools](modules/Log/ChronoLogger.mpp)
- [Hashing functions](modules/String/Hash.mpp)
- Networking functions ([Server](modules/Network/Server.mpp)/[Client](modules/Network/Client.mpp))
- [Color terminal writing](modules/Terminal/TextModifier.mpp)
- Utilities for securing multithreaded accesses ([UniqueLocker](modules/Thread/UniqueLocker.mpp), [SharedLocker](modules/Thread/SharedLocker.mpp))
- A [ThreadPool](modules/Thread/ThreadPool.mpp)
- [Tools for writing unit tests](modules/UnitTest/UnitTest.mpp)
- [STL polyfills](include/Stl)
- Many other functionsThe [unit tests](tests) serve as examples of how to use these functions.
## Getting Started
A C++23 compliant compiler with std module support and XMake is needed to build CppUtils
This library is used in my C++ projects, but you can also use it in your projects.
Just follow the installation steps and consult the documentation for each feature you need.### Installation
In your XMake projects:
```lua
add_repositories("xmake-repo [email protected]:MorganCaron/xmake-repo.git")
add_requires("CppUtils")target("YourProject", function()
add_packages("CppUtils", {public = true})
end)
```### Contribute
### Build command
```console
xmake f --toolchain=llvm --runtimes="c++_shared" [--enable_tests=y] --yes
xmake [b|build] [-vD]
```### Run tests
```console
xmake [r|run]
```[](CONTRIBUTING.md)
---