The template sets up a coding environment for C++20 language standard. It uses Bazel as the build system. Clang toolchain is downloaded automatically when running the first build.
New lib can be easily added by copying curent lib and adding it as dependency to main module. Each lib is divided into:
- include - where all the header files resides,
- src - place where the actual implementation is,
- test - unit tests,
- benchmark - place for benchmarks.
The following template uses:
- Bazel a fast, scalable, multi-language and extensible build system,
- clang provides a language front-end and tooling infrastructure for languages in the C language family,
- UT/μT C++ single header/single module, macro-free μ(micro)/Unit Testing Framework,
- nanobench Simple, fast, accurate single-header microbenchmarking functionality for C++11/14/17/20.
Bazel is prerequisite to compile the project.
bazel build //...
All other dependencies are downloaded on-demand.
The repository includes (micro) Unit Testing Framework and nanobench. To run tests simply issue:
bazel test //...
The project contains devcontainer configuration and can be easily run on GitHub Codespaces To use devcontainer, install the VSCode extension Remote - Containers.