ShlubluLib
v0.5
ShlubluLib is a lightweight, modular, general purpose, open-source C++ library for Linux and Windows.
|
ShlubluLib is a lightweight, modular, general purpose, open-source C++ library for Linux and Windows.
The current version is v0.5.
This library is designed to be simple to use. It is intended to cover frequent use cases in a simple way without preventing or hindering the development of more advanced features when needed. It actually consists of code that I wrote for my own use and that could be useful to others.
ShlubluLib is licensed under the EUPL-1.2-or-later (European Union Public Licence), which is compatible with the most frequent open source licenses. Please see the file "LICENSE.txt", or read the EUPL text online in any EU language.
This library currently consists in the following modules:
async
: threading and asynchronous operationsMutexLock
: Recursive mutex helper based on std::recursive_mutex
.binding
: interactions with other languagesPython
: based on the CPython standard API, this module is intended to make Python integration easier.hash
: hash algorithmsCRC
: cyclic redundancy check.math
: math issues
random
: random numbers generation
text
: text content handlingString
: helper functions not included in std::string
.util
: miscellaneousDebug
: Macros useful for developing and debugging: compilation messages, optimization control, and so on.NotImplementedError
: Exception thrown in case of missing implementation..The Doxygen documentation of these modules is available at shlublulib.shlublu.org/v0.5/.
Some of these modules require external libraries such as Boost or Python. Such requirements are specified in their documentation.
Changes since former versions are tracked in the file CHANGELOG.md
.
This is a C++17 library.
The deprecated class template std::codecvt is still used though as it has no standardized replacement so far.
Should you just wish to use Shlublulib as a development tool, the binary distribution can be downloaded from our website.
ee144fa83ef40ca7f47df93d5fe39cbd0a0db0322f97bece30c0b3580a045d77
)6baeed7e71a876ee1f025bbf9fe1ee63df97abdfe514fc15f8fad61f94312bf7
)These archives are signed with this PGP key so that you can check their integrity. They contain:
include
directory to add to your include pathCHANGELOG.md
fileLICENSE.txt
applicable to this libraryShould you wish to contribute, to play with the code, or should you prefer not to download binaries, this method is for you.
The following libraries are required for ShlubluLib to compile:
Those version numbers correspond to my testing. Lower version numbers may work but this has not been tested yet.
This library is developed under Microsoft Visual Studio 2019 using the following features and extensions:
Visual Studio is not an absolute prerequisite. The modules codebase compiles with GCC 5.4 or above. Only makefiles and unit tests are specific to Visual Studio. They can be quite easily rewritten for other tools if needed. Should you plan to do that please let me know and I'll provide you with the g++
and ar
command lines I use for Linux.
The same way, depending on what you would like to do, you do not need all of the above:
You can either:
The repository is organized as follows on the files system:
| |____doc/ | |____notice.txt | |____include/ | |____shlublu/ | |____(module A)/ | | |____(feature X.h) | | |____(feature Y.h) | | | |____(module B)/ | |____(...) | |____src/ | |____(module A)/ | | |____(feature X.cpp) | | |____(feature Y.cpp) | | | |____(module B)/ | |____(...) | |____tests/ | |____(module A)/ | | |____(tests feature X.cpp) | | | |____(module B)/ | |____(...) | |____ShlubluLib.sln | |____(VS unit tests subproject files) |____(VS Linux subproject files) |____(VS Windows subproject files) | |____CHANGELOG.md |____doxygen.conf |____doxygen-structure.txt |____LICENSE.txt |____README.md
The main project file to open with Visual Studio is ShlubluLib.sln
.
The Visual Studio projects structure looks like this:
ShlubluLib | |____CHANGELOG.md |____doxygen.conf |____doxygen-structure.txt |____LICENSE.txt |____README.md | |____00tests-shlublu | |____tests/ | |____(module A) | | |____(tests X.cpp) | | |____(tests Y.cpp) | | | |____(module B) | |____(...) | |____shlublu | |____include/ | | |____(module A) | | | |____(feature X.h) | | | |____(feature Y.h) | | | | | |____(module B) | | |____(...) | | | |____src/ | |____(module A) | | |____(feature X.cpp) | | |____(feature Y.cpp) | | | |____(module B) | |____(...) | |____shlublu-linux |____include/ | |____(module A) | | |____(feature X.h) | | |____(feature Y.h) | | | |____(module B) | |____(...) | |____src/ |____(module A) | |____(feature X.cpp) | |____(feature Y.cpp) | |____(module B) |____(...)
The projects shlublu
(Windows) and shlublu-linux
(Linux) can be built independantly of each other. You can decide to only build those you are interested in.
The unit tests project 00tests-shlublu
, on its end, depends on shlublu
. Building it is optional.
Projects you plan to use need their settings to be modified according to your local environment:
00tests-shlublu
**:shlublu
**:shlublu-linux
**:I am working on making this cleaner and easier to use. I hope it's ok for now.
00tests-shlublu
** creates a test suite that can be used from the Test Explorer tab of Visual Studioshlublu
** outputs to:<\path\to\ShlubluLib>\x64\<Debug|Release>\shlublu.lib
shlublu-linux
** outputs to:<\path\to\ShlubluLib>\bin\x64\<Debug|Release>\libshlublu-linux.a
~/projects/shlublu-linux/bin/x64/<Debug|Release>\libshlublu-linux.a
Your client projects should also add the following directory to their include path:
<\path\to>\ShlubluLib\include\
~/projects/shlublu-linux/include
Unit tests are only available for Windows currently.
My name is Vincent Poulain.
You can find me there (user ID: @shlublu):
PGP public key: 0x1412f1e42222f90d
Many thanks to: