This repository contains examples of how to use the TooManyCooks asynchronous runtime. The main TMC project repository can be found at: https://github.com/tzcnt/TooManyCooks/
Some of the examples also use other libraries in the TMC ecosystem: https://github.com/tzcnt/tmc-asio/
This repository uses CMake to download and configure the TMC libraries, either as CPM packages (by default), or as git submodules (optionally). It provides a CMakePresets.json with configurations for Linux/Windows/MacOS and Clang/GCC/MSVC.
Choose a value for PRESET from CMakePresets.json that is appropriate for your system.
PRESET=clang-linux-release
cmake --preset $PRESET .
cmake --build ./build/$PRESET --target all
cd ./build/$PRESET
./tests/testsFor a minimal project template to setup TMC for your own uses, see
tmc-hello-world.
All 3 major compilers are fully supported, but Clang is the recommended compiler, as it has the best coroutine codegen and the most functional HALO implementation.
Linux:
- Clang 17 or newer
- GCC 14 or newer
Windows:
- Clang 17 or newer (via clang-cl.exe)
- MSVC Build Tools v145 (Visual Studio 2026 Insiders) or newer due to this bug which exists in prior versions
MacOS:
- Apple Clang based on Clang 17 or newer with -fexperimental-library
- x86 (32- or 64-bit)
- AArch64
Although the TMC libraries are licensed under the Boost Software License 1.0, the example code in this repository is public domain ("The Unlicense"), and may be copied or modified without attribution.