Skip to content

tzcnt/tmc-examples

Repository files navigation

x64-linux-gcc x64-linux-clang x64-windows-clang-cl arm64-macos-clang

AddressSanitizer ThreadSanitizer UndefinedBehaviorSanitizer

tmc-examples

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.

Building

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/tests

For a minimal project template to setup TMC for your own uses, see :octocat: tmc-hello-world.

Supported Compilers

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

Supported Hardware

  • x86 (32- or 64-bit)
  • AArch64

License

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.

About

TooManyCooks examples

Resources

License

Stars

Watchers

Forks

Packages

No packages published